Commit 8d4b78cd authored by vipwzw's avatar vipwzw Committed by 33cn

auto ci

parent 051aec83
// Code generated by protoc-gen-go. DO NOT EDIT.
// source: exchange.proto
/*
Package types is a generated protocol buffer package.
It is generated from these files:
exchange.proto
It has these top-level messages:
Exchange
ExchangeAction
LimitOrder
MarketOrder
RevokeOrder
Asset
Order
QueryMarketDepth
MarketDepth
MarketDepthList
QueryHistoryOrderList
QueryOrder
QueryOrderList
OrderList
ReceiptExchange
*/
package types
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
context "golang.org/x/net/context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
)
......@@ -47,46 +21,96 @@ var _ = math.Inf
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
type Exchange struct {
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Exchange) Reset() { *m = Exchange{} }
func (m *Exchange) String() string { return proto.CompactTextString(m) }
func (*Exchange) ProtoMessage() {}
func (*Exchange) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{0}
}
func (m *Exchange) Reset() { *m = Exchange{} }
func (m *Exchange) String() string { return proto.CompactTextString(m) }
func (*Exchange) ProtoMessage() {}
func (*Exchange) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
func (m *Exchange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Exchange.Unmarshal(m, b)
}
func (m *Exchange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Exchange.Marshal(b, m, deterministic)
}
func (m *Exchange) XXX_Merge(src proto.Message) {
xxx_messageInfo_Exchange.Merge(m, src)
}
func (m *Exchange) XXX_Size() int {
return xxx_messageInfo_Exchange.Size(m)
}
func (m *Exchange) XXX_DiscardUnknown() {
xxx_messageInfo_Exchange.DiscardUnknown(m)
}
var xxx_messageInfo_Exchange proto.InternalMessageInfo
type ExchangeAction struct {
// Types that are valid to be assigned to Value:
// *ExchangeAction_LimitOrder
// *ExchangeAction_MarketOrder
// *ExchangeAction_RevokeOrder
Value isExchangeAction_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,6,opt,name=ty" json:"ty,omitempty"`
Value isExchangeAction_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,6,opt,name=ty,proto3" json:"ty,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ExchangeAction) Reset() { *m = ExchangeAction{} }
func (m *ExchangeAction) String() string { return proto.CompactTextString(m) }
func (*ExchangeAction) ProtoMessage() {}
func (*ExchangeAction) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{1}
}
func (m *ExchangeAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ExchangeAction.Unmarshal(m, b)
}
func (m *ExchangeAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ExchangeAction.Marshal(b, m, deterministic)
}
func (m *ExchangeAction) XXX_Merge(src proto.Message) {
xxx_messageInfo_ExchangeAction.Merge(m, src)
}
func (m *ExchangeAction) XXX_Size() int {
return xxx_messageInfo_ExchangeAction.Size(m)
}
func (m *ExchangeAction) XXX_DiscardUnknown() {
xxx_messageInfo_ExchangeAction.DiscardUnknown(m)
}
func (m *ExchangeAction) Reset() { *m = ExchangeAction{} }
func (m *ExchangeAction) String() string { return proto.CompactTextString(m) }
func (*ExchangeAction) ProtoMessage() {}
func (*ExchangeAction) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{1} }
var xxx_messageInfo_ExchangeAction proto.InternalMessageInfo
type isExchangeAction_Value interface {
isExchangeAction_Value()
}
type ExchangeAction_LimitOrder struct {
LimitOrder *LimitOrder `protobuf:"bytes,1,opt,name=limitOrder,oneof"`
LimitOrder *LimitOrder `protobuf:"bytes,1,opt,name=limitOrder,proto3,oneof"`
}
type ExchangeAction_MarketOrder struct {
MarketOrder *MarketOrder `protobuf:"bytes,2,opt,name=marketOrder,oneof"`
MarketOrder *MarketOrder `protobuf:"bytes,2,opt,name=marketOrder,proto3,oneof"`
}
type ExchangeAction_RevokeOrder struct {
RevokeOrder *RevokeOrder `protobuf:"bytes,3,opt,name=revokeOrder,oneof"`
RevokeOrder *RevokeOrder `protobuf:"bytes,3,opt,name=revokeOrder,proto3,oneof"`
}
func (*ExchangeAction_LimitOrder) isExchangeAction_Value() {}
func (*ExchangeAction_LimitOrder) isExchangeAction_Value() {}
func (*ExchangeAction_MarketOrder) isExchangeAction_Value() {}
func (*ExchangeAction_RevokeOrder) isExchangeAction_Value() {}
func (m *ExchangeAction) GetValue() isExchangeAction_Value {
......@@ -124,117 +148,56 @@ func (m *ExchangeAction) GetTy() int32 {
return 0
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*ExchangeAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _ExchangeAction_OneofMarshaler, _ExchangeAction_OneofUnmarshaler, _ExchangeAction_OneofSizer, []interface{}{
// XXX_OneofWrappers is for the internal use of the proto package.
func (*ExchangeAction) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*ExchangeAction_LimitOrder)(nil),
(*ExchangeAction_MarketOrder)(nil),
(*ExchangeAction_RevokeOrder)(nil),
}
}
func _ExchangeAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*ExchangeAction)
// value
switch x := m.Value.(type) {
case *ExchangeAction_LimitOrder:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.LimitOrder); err != nil {
return err
}
case *ExchangeAction_MarketOrder:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.MarketOrder); err != nil {
return err
}
case *ExchangeAction_RevokeOrder:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.RevokeOrder); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("ExchangeAction.Value has unexpected type %T", x)
}
return nil
//限价订单
type LimitOrder struct {
//交易对
LeftAsset *Asset `protobuf:"bytes,1,opt,name=leftAsset,proto3" json:"leftAsset,omitempty"`
//交易对
RightAsset *Asset `protobuf:"bytes,2,opt,name=rightAsset,proto3" json:"rightAsset,omitempty"`
//价格
Price int64 `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"`
//总量
Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"`
//操作, 1为买,2为卖
Op int32 `protobuf:"varint,5,opt,name=op,proto3" json:"op,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func _ExchangeAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*ExchangeAction)
switch tag {
case 1: // value.limitOrder
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(LimitOrder)
err := b.DecodeMessage(msg)
m.Value = &ExchangeAction_LimitOrder{msg}
return true, err
case 2: // value.marketOrder
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(MarketOrder)
err := b.DecodeMessage(msg)
m.Value = &ExchangeAction_MarketOrder{msg}
return true, err
case 3: // value.revokeOrder
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(RevokeOrder)
err := b.DecodeMessage(msg)
m.Value = &ExchangeAction_RevokeOrder{msg}
return true, err
default:
return false, nil
}
}
func _ExchangeAction_OneofSizer(msg proto.Message) (n int) {
m := msg.(*ExchangeAction)
// value
switch x := m.Value.(type) {
case *ExchangeAction_LimitOrder:
s := proto.Size(x.LimitOrder)
n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *ExchangeAction_MarketOrder:
s := proto.Size(x.MarketOrder)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *ExchangeAction_RevokeOrder:
s := proto.Size(x.RevokeOrder)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// 限价订单
type LimitOrder struct {
// 交易对
LeftAsset *Asset `protobuf:"bytes,1,opt,name=leftAsset" json:"leftAsset,omitempty"`
// 交易对
RightAsset *Asset `protobuf:"bytes,2,opt,name=rightAsset" json:"rightAsset,omitempty"`
// 价格
Price int64 `protobuf:"varint,3,opt,name=price" json:"price,omitempty"`
// 总量
Amount int64 `protobuf:"varint,4,opt,name=amount" json:"amount,omitempty"`
// 操作, 1为买,2为卖
Op int32 `protobuf:"varint,5,opt,name=op" json:"op,omitempty"`
}
func (m *LimitOrder) Reset() { *m = LimitOrder{} }
func (m *LimitOrder) String() string { return proto.CompactTextString(m) }
func (*LimitOrder) ProtoMessage() {}
func (*LimitOrder) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{2} }
func (m *LimitOrder) Reset() { *m = LimitOrder{} }
func (m *LimitOrder) String() string { return proto.CompactTextString(m) }
func (*LimitOrder) ProtoMessage() {}
func (*LimitOrder) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{2}
}
func (m *LimitOrder) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LimitOrder.Unmarshal(m, b)
}
func (m *LimitOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LimitOrder.Marshal(b, m, deterministic)
}
func (m *LimitOrder) XXX_Merge(src proto.Message) {
xxx_messageInfo_LimitOrder.Merge(m, src)
}
func (m *LimitOrder) XXX_Size() int {
return xxx_messageInfo_LimitOrder.Size(m)
}
func (m *LimitOrder) XXX_DiscardUnknown() {
xxx_messageInfo_LimitOrder.DiscardUnknown(m)
}
var xxx_messageInfo_LimitOrder proto.InternalMessageInfo
func (m *LimitOrder) GetLeftAsset() *Asset {
if m != nil {
......@@ -271,22 +234,45 @@ func (m *LimitOrder) GetOp() int32 {
return 0
}
// 市价委托
//市价委托
type MarketOrder struct {
// 资产1
LeftAsset *Asset `protobuf:"bytes,1,opt,name=leftAsset" json:"leftAsset,omitempty"`
// 资产2
RightAsset *Asset `protobuf:"bytes,2,opt,name=rightAsset" json:"rightAsset,omitempty"`
// 总量
Amount int64 `protobuf:"varint,3,opt,name=amount" json:"amount,omitempty"`
// 操作, 1为买,2为卖
Op int32 `protobuf:"varint,4,opt,name=op" json:"op,omitempty"`
//资产1
LeftAsset *Asset `protobuf:"bytes,1,opt,name=leftAsset,proto3" json:"leftAsset,omitempty"`
//资产2
RightAsset *Asset `protobuf:"bytes,2,opt,name=rightAsset,proto3" json:"rightAsset,omitempty"`
//总量
Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"`
//操作, 1为买,2为卖
Op int32 `protobuf:"varint,4,opt,name=op,proto3" json:"op,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MarketOrder) Reset() { *m = MarketOrder{} }
func (m *MarketOrder) String() string { return proto.CompactTextString(m) }
func (*MarketOrder) ProtoMessage() {}
func (*MarketOrder) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{3}
}
func (m *MarketOrder) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MarketOrder.Unmarshal(m, b)
}
func (m *MarketOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MarketOrder.Marshal(b, m, deterministic)
}
func (m *MarketOrder) XXX_Merge(src proto.Message) {
xxx_messageInfo_MarketOrder.Merge(m, src)
}
func (m *MarketOrder) XXX_Size() int {
return xxx_messageInfo_MarketOrder.Size(m)
}
func (m *MarketOrder) XXX_DiscardUnknown() {
xxx_messageInfo_MarketOrder.DiscardUnknown(m)
}
func (m *MarketOrder) Reset() { *m = MarketOrder{} }
func (m *MarketOrder) String() string { return proto.CompactTextString(m) }
func (*MarketOrder) ProtoMessage() {}
func (*MarketOrder) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{3} }
var xxx_messageInfo_MarketOrder proto.InternalMessageInfo
func (m *MarketOrder) GetLeftAsset() *Asset {
if m != nil {
......@@ -316,16 +302,39 @@ func (m *MarketOrder) GetOp() int32 {
return 0
}
// 撤回订单
//撤回订单
type RevokeOrder struct {
// 订单号
OrderID int64 `protobuf:"varint,1,opt,name=orderID" json:"orderID,omitempty"`
//订单号
OrderID int64 `protobuf:"varint,1,opt,name=orderID,proto3" json:"orderID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RevokeOrder) Reset() { *m = RevokeOrder{} }
func (m *RevokeOrder) String() string { return proto.CompactTextString(m) }
func (*RevokeOrder) ProtoMessage() {}
func (*RevokeOrder) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{4}
}
func (m *RevokeOrder) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RevokeOrder.Unmarshal(m, b)
}
func (m *RevokeOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RevokeOrder.Marshal(b, m, deterministic)
}
func (m *RevokeOrder) XXX_Merge(src proto.Message) {
xxx_messageInfo_RevokeOrder.Merge(m, src)
}
func (m *RevokeOrder) XXX_Size() int {
return xxx_messageInfo_RevokeOrder.Size(m)
}
func (m *RevokeOrder) XXX_DiscardUnknown() {
xxx_messageInfo_RevokeOrder.DiscardUnknown(m)
}
func (m *RevokeOrder) Reset() { *m = RevokeOrder{} }
func (m *RevokeOrder) String() string { return proto.CompactTextString(m) }
func (*RevokeOrder) ProtoMessage() {}
func (*RevokeOrder) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{4} }
var xxx_messageInfo_RevokeOrder proto.InternalMessageInfo
func (m *RevokeOrder) GetOrderID() int64 {
if m != nil {
......@@ -334,16 +343,39 @@ func (m *RevokeOrder) GetOrderID() int64 {
return 0
}
// 资产类型
//资产类型
type Asset struct {
Execer string `protobuf:"bytes,1,opt,name=execer" json:"execer,omitempty"`
Symbol string `protobuf:"bytes,2,opt,name=symbol" json:"symbol,omitempty"`
Execer string `protobuf:"bytes,1,opt,name=execer,proto3" json:"execer,omitempty"`
Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Asset) Reset() { *m = Asset{} }
func (m *Asset) String() string { return proto.CompactTextString(m) }
func (*Asset) ProtoMessage() {}
func (*Asset) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{5} }
func (m *Asset) Reset() { *m = Asset{} }
func (m *Asset) String() string { return proto.CompactTextString(m) }
func (*Asset) ProtoMessage() {}
func (*Asset) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{5}
}
func (m *Asset) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Asset.Unmarshal(m, b)
}
func (m *Asset) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Asset.Marshal(b, m, deterministic)
}
func (m *Asset) XXX_Merge(src proto.Message) {
xxx_messageInfo_Asset.Merge(m, src)
}
func (m *Asset) XXX_Size() int {
return xxx_messageInfo_Asset.Size(m)
}
func (m *Asset) XXX_DiscardUnknown() {
xxx_messageInfo_Asset.DiscardUnknown(m)
}
var xxx_messageInfo_Asset proto.InternalMessageInfo
func (m *Asset) GetExecer() string {
if m != nil {
......@@ -359,48 +391,80 @@ func (m *Asset) GetSymbol() string {
return ""
}
// 订单信息
//订单信息
type Order struct {
OrderID int64 `protobuf:"varint,1,opt,name=orderID" json:"orderID,omitempty"`
OrderID int64 `protobuf:"varint,1,opt,name=orderID,proto3" json:"orderID,omitempty"`
// Types that are valid to be assigned to Value:
// *Order_LimitOrder
// *Order_MarketOrder
Value isOrder_Value `protobuf_oneof:"value"`
// 挂单类型
Ty int32 `protobuf:"varint,4,opt,name=ty" json:"ty,omitempty"`
// 已经成交的数量
Executed int64 `protobuf:"varint,5,opt,name=executed" json:"executed,omitempty"`
// 成交均价
AVGPrice int64 `protobuf:"varint,6,opt,name=AVG_price,json=AVGPrice" json:"AVG_price,omitempty"`
// 余额
Balance int64 `protobuf:"varint,7,opt,name=balance" json:"balance,omitempty"`
// 状态,0 挂单中ordered, 1 完成completed, 2撤回 revoked
Status int32 `protobuf:"varint,8,opt,name=status" json:"status,omitempty"`
// 用户地址
Addr string `protobuf:"bytes,9,opt,name=addr" json:"addr,omitempty"`
// 更新时间
UpdateTime int64 `protobuf:"varint,10,opt,name=updateTime" json:"updateTime,omitempty"`
// 索引
Index int64 `protobuf:"varint,11,opt,name=index" json:"index,omitempty"`
}
func (m *Order) Reset() { *m = Order{} }
func (m *Order) String() string { return proto.CompactTextString(m) }
func (*Order) ProtoMessage() {}
func (*Order) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{6} }
//挂单类型
Ty int32 `protobuf:"varint,4,opt,name=ty,proto3" json:"ty,omitempty"`
//已经成交的数量
Executed int64 `protobuf:"varint,5,opt,name=executed,proto3" json:"executed,omitempty"`
//成交均价
AVGPrice int64 `protobuf:"varint,6,opt,name=AVG_price,json=AVGPrice,proto3" json:"AVG_price,omitempty"`
//余额
Balance int64 `protobuf:"varint,7,opt,name=balance,proto3" json:"balance,omitempty"`
//状态,0 挂单中ordered, 1 完成completed, 2撤回 revoked
Status int32 `protobuf:"varint,8,opt,name=status,proto3" json:"status,omitempty"`
//用户地址
Addr string `protobuf:"bytes,9,opt,name=addr,proto3" json:"addr,omitempty"`
//更新时间
UpdateTime int64 `protobuf:"varint,10,opt,name=updateTime,proto3" json:"updateTime,omitempty"`
//索引
Index int64 `protobuf:"varint,11,opt,name=index,proto3" json:"index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *Order) Reset() { *m = Order{} }
func (m *Order) String() string { return proto.CompactTextString(m) }
func (*Order) ProtoMessage() {}
func (*Order) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{6}
}
func (m *Order) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Order.Unmarshal(m, b)
}
func (m *Order) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Order.Marshal(b, m, deterministic)
}
func (m *Order) XXX_Merge(src proto.Message) {
xxx_messageInfo_Order.Merge(m, src)
}
func (m *Order) XXX_Size() int {
return xxx_messageInfo_Order.Size(m)
}
func (m *Order) XXX_DiscardUnknown() {
xxx_messageInfo_Order.DiscardUnknown(m)
}
var xxx_messageInfo_Order proto.InternalMessageInfo
func (m *Order) GetOrderID() int64 {
if m != nil {
return m.OrderID
}
return 0
}
type isOrder_Value interface {
isOrder_Value()
}
type Order_LimitOrder struct {
LimitOrder *LimitOrder `protobuf:"bytes,2,opt,name=limitOrder,oneof"`
LimitOrder *LimitOrder `protobuf:"bytes,2,opt,name=limitOrder,proto3,oneof"`
}
type Order_MarketOrder struct {
MarketOrder *MarketOrder `protobuf:"bytes,3,opt,name=marketOrder,oneof"`
MarketOrder *MarketOrder `protobuf:"bytes,3,opt,name=marketOrder,proto3,oneof"`
}
func (*Order_LimitOrder) isOrder_Value() {}
func (*Order_LimitOrder) isOrder_Value() {}
func (*Order_MarketOrder) isOrder_Value() {}
func (m *Order) GetValue() isOrder_Value {
......@@ -410,13 +474,6 @@ func (m *Order) GetValue() isOrder_Value {
return nil
}
func (m *Order) GetOrderID() int64 {
if m != nil {
return m.OrderID
}
return 0
}
func (m *Order) GetLimitOrder() *LimitOrder {
if x, ok := m.GetValue().(*Order_LimitOrder); ok {
return x.LimitOrder
......@@ -487,98 +544,55 @@ func (m *Order) GetIndex() int64 {
return 0
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Order) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Order_OneofMarshaler, _Order_OneofUnmarshaler, _Order_OneofSizer, []interface{}{
// XXX_OneofWrappers is for the internal use of the proto package.
func (*Order) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*Order_LimitOrder)(nil),
(*Order_MarketOrder)(nil),
}
}
func _Order_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Order)
// value
switch x := m.Value.(type) {
case *Order_LimitOrder:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.LimitOrder); err != nil {
return err
}
case *Order_MarketOrder:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.MarketOrder); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Order.Value has unexpected type %T", x)
}
return nil
}
func _Order_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Order)
switch tag {
case 2: // value.limitOrder
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(LimitOrder)
err := b.DecodeMessage(msg)
m.Value = &Order_LimitOrder{msg}
return true, err
case 3: // value.marketOrder
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(MarketOrder)
err := b.DecodeMessage(msg)
m.Value = &Order_MarketOrder{msg}
return true, err
default:
return false, nil
}
}
func _Order_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Order)
// value
switch x := m.Value.(type) {
case *Order_LimitOrder:
s := proto.Size(x.LimitOrder)
n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *Order_MarketOrder:
s := proto.Size(x.MarketOrder)
n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// 查询接口
//查询接口
type QueryMarketDepth struct {
// 资产1
LeftAsset *Asset `protobuf:"bytes,1,opt,name=leftAsset" json:"leftAsset,omitempty"`
// 资产2
RightAsset *Asset `protobuf:"bytes,2,opt,name=rightAsset" json:"rightAsset,omitempty"`
// 操作, 1为买,2为卖
Op int32 `protobuf:"varint,3,opt,name=op" json:"op,omitempty"`
//资产1
LeftAsset *Asset `protobuf:"bytes,1,opt,name=leftAsset,proto3" json:"leftAsset,omitempty"`
//资产2
RightAsset *Asset `protobuf:"bytes,2,opt,name=rightAsset,proto3" json:"rightAsset,omitempty"`
//操作, 1为买,2为卖
Op int32 `protobuf:"varint,3,opt,name=op,proto3" json:"op,omitempty"`
// 这里用价格作为索引值
PrimaryKey string `protobuf:"bytes,4,opt,name=primaryKey" json:"primaryKey,omitempty"`
// 单页返回多少条记录,默认返回10条,为了系统安全最多单次只能返回20条
Count int32 `protobuf:"varint,5,opt,name=count" json:"count,omitempty"`
PrimaryKey string `protobuf:"bytes,4,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"`
//单页返回多少条记录,默认返回10条,为了系统安全最多单次只能返回20条
Count int32 `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryMarketDepth) Reset() { *m = QueryMarketDepth{} }
func (m *QueryMarketDepth) String() string { return proto.CompactTextString(m) }
func (*QueryMarketDepth) ProtoMessage() {}
func (*QueryMarketDepth) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{7} }
func (m *QueryMarketDepth) Reset() { *m = QueryMarketDepth{} }
func (m *QueryMarketDepth) String() string { return proto.CompactTextString(m) }
func (*QueryMarketDepth) ProtoMessage() {}
func (*QueryMarketDepth) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{7}
}
func (m *QueryMarketDepth) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryMarketDepth.Unmarshal(m, b)
}
func (m *QueryMarketDepth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryMarketDepth.Marshal(b, m, deterministic)
}
func (m *QueryMarketDepth) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryMarketDepth.Merge(m, src)
}
func (m *QueryMarketDepth) XXX_Size() int {
return xxx_messageInfo_QueryMarketDepth.Size(m)
}
func (m *QueryMarketDepth) XXX_DiscardUnknown() {
xxx_messageInfo_QueryMarketDepth.DiscardUnknown(m)
}
var xxx_messageInfo_QueryMarketDepth proto.InternalMessageInfo
func (m *QueryMarketDepth) GetLeftAsset() *Asset {
if m != nil {
......@@ -615,24 +629,47 @@ func (m *QueryMarketDepth) GetCount() int32 {
return 0
}
// 市场深度
//市场深度
type MarketDepth struct {
// 资产1
LeftAsset *Asset `protobuf:"bytes,1,opt,name=leftAsset" json:"leftAsset,omitempty"`
// 资产2
RightAsset *Asset `protobuf:"bytes,2,opt,name=rightAsset" json:"rightAsset,omitempty"`
// 价格
Price int64 `protobuf:"varint,3,opt,name=price" json:"price,omitempty"`
// 总量
Amount int64 `protobuf:"varint,4,opt,name=amount" json:"amount,omitempty"`
// 操作, 1为买,2为卖
Op int32 `protobuf:"varint,5,opt,name=op" json:"op,omitempty"`
}
func (m *MarketDepth) Reset() { *m = MarketDepth{} }
func (m *MarketDepth) String() string { return proto.CompactTextString(m) }
func (*MarketDepth) ProtoMessage() {}
func (*MarketDepth) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{8} }
//资产1
LeftAsset *Asset `protobuf:"bytes,1,opt,name=leftAsset,proto3" json:"leftAsset,omitempty"`
//资产2
RightAsset *Asset `protobuf:"bytes,2,opt,name=rightAsset,proto3" json:"rightAsset,omitempty"`
//价格
Price int64 `protobuf:"varint,3,opt,name=price,proto3" json:"price,omitempty"`
//总量
Amount int64 `protobuf:"varint,4,opt,name=amount,proto3" json:"amount,omitempty"`
//操作, 1为买,2为卖
Op int32 `protobuf:"varint,5,opt,name=op,proto3" json:"op,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MarketDepth) Reset() { *m = MarketDepth{} }
func (m *MarketDepth) String() string { return proto.CompactTextString(m) }
func (*MarketDepth) ProtoMessage() {}
func (*MarketDepth) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{8}
}
func (m *MarketDepth) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MarketDepth.Unmarshal(m, b)
}
func (m *MarketDepth) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MarketDepth.Marshal(b, m, deterministic)
}
func (m *MarketDepth) XXX_Merge(src proto.Message) {
xxx_messageInfo_MarketDepth.Merge(m, src)
}
func (m *MarketDepth) XXX_Size() int {
return xxx_messageInfo_MarketDepth.Size(m)
}
func (m *MarketDepth) XXX_DiscardUnknown() {
xxx_messageInfo_MarketDepth.DiscardUnknown(m)
}
var xxx_messageInfo_MarketDepth proto.InternalMessageInfo
func (m *MarketDepth) GetLeftAsset() *Asset {
if m != nil {
......@@ -669,16 +706,39 @@ func (m *MarketDepth) GetOp() int32 {
return 0
}
// 查询接口返回的市场深度列表
//查询接口返回的市场深度列表
type MarketDepthList struct {
List []*MarketDepth `protobuf:"bytes,1,rep,name=list" json:"list,omitempty"`
PrimaryKey string `protobuf:"bytes,2,opt,name=primaryKey" json:"primaryKey,omitempty"`
List []*MarketDepth `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
PrimaryKey string `protobuf:"bytes,2,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *MarketDepthList) Reset() { *m = MarketDepthList{} }
func (m *MarketDepthList) String() string { return proto.CompactTextString(m) }
func (*MarketDepthList) ProtoMessage() {}
func (*MarketDepthList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{9} }
func (m *MarketDepthList) Reset() { *m = MarketDepthList{} }
func (m *MarketDepthList) String() string { return proto.CompactTextString(m) }
func (*MarketDepthList) ProtoMessage() {}
func (*MarketDepthList) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{9}
}
func (m *MarketDepthList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_MarketDepthList.Unmarshal(m, b)
}
func (m *MarketDepthList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_MarketDepthList.Marshal(b, m, deterministic)
}
func (m *MarketDepthList) XXX_Merge(src proto.Message) {
xxx_messageInfo_MarketDepthList.Merge(m, src)
}
func (m *MarketDepthList) XXX_Size() int {
return xxx_messageInfo_MarketDepthList.Size(m)
}
func (m *MarketDepthList) XXX_DiscardUnknown() {
xxx_messageInfo_MarketDepthList.DiscardUnknown(m)
}
var xxx_messageInfo_MarketDepthList proto.InternalMessageInfo
func (m *MarketDepthList) GetList() []*MarketDepth {
if m != nil {
......@@ -694,24 +754,47 @@ func (m *MarketDepthList) GetPrimaryKey() string {
return ""
}
// 查询最新得成交信息,外部接口
//查询最新得成交信息,外部接口
type QueryHistoryOrderList struct {
// 资产1
LeftAsset *Asset `protobuf:"bytes,1,opt,name=leftAsset" json:"leftAsset,omitempty"`
// 资产2
RightAsset *Asset `protobuf:"bytes,2,opt,name=rightAsset" json:"rightAsset,omitempty"`
//资产1
LeftAsset *Asset `protobuf:"bytes,1,opt,name=leftAsset,proto3" json:"leftAsset,omitempty"`
//资产2
RightAsset *Asset `protobuf:"bytes,2,opt,name=rightAsset,proto3" json:"rightAsset,omitempty"`
// 索引值
PrimaryKey string `protobuf:"bytes,3,opt,name=primaryKey" json:"primaryKey,omitempty"`
// 单页返回多少条记录,默认返回10条,为了系统安全最多单次只能返回20条
Count int32 `protobuf:"varint,4,opt,name=count" json:"count,omitempty"`
PrimaryKey string `protobuf:"bytes,3,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"`
//单页返回多少条记录,默认返回10条,为了系统安全最多单次只能返回20条
Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
// 0降序,1升序,默认降序
Direction int32 `protobuf:"varint,5,opt,name=direction" json:"direction,omitempty"`
Direction int32 `protobuf:"varint,5,opt,name=direction,proto3" json:"direction,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryHistoryOrderList) Reset() { *m = QueryHistoryOrderList{} }
func (m *QueryHistoryOrderList) String() string { return proto.CompactTextString(m) }
func (*QueryHistoryOrderList) ProtoMessage() {}
func (*QueryHistoryOrderList) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{10}
}
func (m *QueryHistoryOrderList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryHistoryOrderList.Unmarshal(m, b)
}
func (m *QueryHistoryOrderList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryHistoryOrderList.Marshal(b, m, deterministic)
}
func (m *QueryHistoryOrderList) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryHistoryOrderList.Merge(m, src)
}
func (m *QueryHistoryOrderList) XXX_Size() int {
return xxx_messageInfo_QueryHistoryOrderList.Size(m)
}
func (m *QueryHistoryOrderList) XXX_DiscardUnknown() {
xxx_messageInfo_QueryHistoryOrderList.DiscardUnknown(m)
}
func (m *QueryHistoryOrderList) Reset() { *m = QueryHistoryOrderList{} }
func (m *QueryHistoryOrderList) String() string { return proto.CompactTextString(m) }
func (*QueryHistoryOrderList) ProtoMessage() {}
func (*QueryHistoryOrderList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{10} }
var xxx_messageInfo_QueryHistoryOrderList proto.InternalMessageInfo
func (m *QueryHistoryOrderList) GetLeftAsset() *Asset {
if m != nil {
......@@ -748,15 +831,38 @@ func (m *QueryHistoryOrderList) GetDirection() int32 {
return 0
}
// 根据orderID去查询订单信息
//根据orderID去查询订单信息
type QueryOrder struct {
OrderID int64 `protobuf:"varint,1,opt,name=orderID" json:"orderID,omitempty"`
OrderID int64 `protobuf:"varint,1,opt,name=orderID,proto3" json:"orderID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryOrder) Reset() { *m = QueryOrder{} }
func (m *QueryOrder) String() string { return proto.CompactTextString(m) }
func (*QueryOrder) ProtoMessage() {}
func (*QueryOrder) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{11} }
func (m *QueryOrder) Reset() { *m = QueryOrder{} }
func (m *QueryOrder) String() string { return proto.CompactTextString(m) }
func (*QueryOrder) ProtoMessage() {}
func (*QueryOrder) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{11}
}
func (m *QueryOrder) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryOrder.Unmarshal(m, b)
}
func (m *QueryOrder) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryOrder.Marshal(b, m, deterministic)
}
func (m *QueryOrder) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryOrder.Merge(m, src)
}
func (m *QueryOrder) XXX_Size() int {
return xxx_messageInfo_QueryOrder.Size(m)
}
func (m *QueryOrder) XXX_DiscardUnknown() {
xxx_messageInfo_QueryOrder.DiscardUnknown(m)
}
var xxx_messageInfo_QueryOrder proto.InternalMessageInfo
func (m *QueryOrder) GetOrderID() int64 {
if m != nil {
......@@ -765,24 +871,47 @@ func (m *QueryOrder) GetOrderID() int64 {
return 0
}
// 根据地址,状态查询用户自己的挂单信息
//根据地址,状态查询用户自己的挂单信息
type QueryOrderList struct {
// 挂单状态必填(默认是0,只查询ordered挂单中的)
Status int32 `protobuf:"varint,1,opt,name=status" json:"status,omitempty"`
// 用户地址信息,必填
Address string `protobuf:"bytes,2,opt,name=address" json:"address,omitempty"`
//挂单状态必填(默认是0,只查询ordered挂单中的)
Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"`
//用户地址信息,必填
Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"`
// 主键索引
PrimaryKey string `protobuf:"bytes,3,opt,name=primaryKey" json:"primaryKey,omitempty"`
// 单页返回多少条记录,默认返回10条,为了系统安全最多单次只能返回20条
Count int32 `protobuf:"varint,4,opt,name=count" json:"count,omitempty"`
PrimaryKey string `protobuf:"bytes,3,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"`
//单页返回多少条记录,默认返回10条,为了系统安全最多单次只能返回20条
Count int32 `protobuf:"varint,4,opt,name=count,proto3" json:"count,omitempty"`
// 0降序,1升序,默认降序
Direction int32 `protobuf:"varint,5,opt,name=direction" json:"direction,omitempty"`
Direction int32 `protobuf:"varint,5,opt,name=direction,proto3" json:"direction,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *QueryOrderList) Reset() { *m = QueryOrderList{} }
func (m *QueryOrderList) String() string { return proto.CompactTextString(m) }
func (*QueryOrderList) ProtoMessage() {}
func (*QueryOrderList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{12} }
func (m *QueryOrderList) Reset() { *m = QueryOrderList{} }
func (m *QueryOrderList) String() string { return proto.CompactTextString(m) }
func (*QueryOrderList) ProtoMessage() {}
func (*QueryOrderList) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{12}
}
func (m *QueryOrderList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryOrderList.Unmarshal(m, b)
}
func (m *QueryOrderList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryOrderList.Marshal(b, m, deterministic)
}
func (m *QueryOrderList) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryOrderList.Merge(m, src)
}
func (m *QueryOrderList) XXX_Size() int {
return xxx_messageInfo_QueryOrderList.Size(m)
}
func (m *QueryOrderList) XXX_DiscardUnknown() {
xxx_messageInfo_QueryOrderList.DiscardUnknown(m)
}
var xxx_messageInfo_QueryOrderList proto.InternalMessageInfo
func (m *QueryOrderList) GetStatus() int32 {
if m != nil {
......@@ -819,16 +948,39 @@ func (m *QueryOrderList) GetDirection() int32 {
return 0
}
// 订单列表
//订单列表
type OrderList struct {
List []*Order `protobuf:"bytes,1,rep,name=list" json:"list,omitempty"`
PrimaryKey string `protobuf:"bytes,2,opt,name=primaryKey" json:"primaryKey,omitempty"`
List []*Order `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
PrimaryKey string `protobuf:"bytes,2,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *OrderList) Reset() { *m = OrderList{} }
func (m *OrderList) String() string { return proto.CompactTextString(m) }
func (*OrderList) ProtoMessage() {}
func (*OrderList) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{13}
}
func (m *OrderList) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_OrderList.Unmarshal(m, b)
}
func (m *OrderList) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_OrderList.Marshal(b, m, deterministic)
}
func (m *OrderList) XXX_Merge(src proto.Message) {
xxx_messageInfo_OrderList.Merge(m, src)
}
func (m *OrderList) XXX_Size() int {
return xxx_messageInfo_OrderList.Size(m)
}
func (m *OrderList) XXX_DiscardUnknown() {
xxx_messageInfo_OrderList.DiscardUnknown(m)
}
func (m *OrderList) Reset() { *m = OrderList{} }
func (m *OrderList) String() string { return proto.CompactTextString(m) }
func (*OrderList) ProtoMessage() {}
func (*OrderList) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{13} }
var xxx_messageInfo_OrderList proto.InternalMessageInfo
func (m *OrderList) GetList() []*Order {
if m != nil {
......@@ -846,15 +998,38 @@ func (m *OrderList) GetPrimaryKey() string {
// exchange执行票据日志
type ReceiptExchange struct {
Order *Order `protobuf:"bytes,1,opt,name=order" json:"order,omitempty"`
MatchOrders []*Order `protobuf:"bytes,2,rep,name=matchOrders" json:"matchOrders,omitempty"`
Index int64 `protobuf:"varint,3,opt,name=index" json:"index,omitempty"`
Order *Order `protobuf:"bytes,1,opt,name=order,proto3" json:"order,omitempty"`
MatchOrders []*Order `protobuf:"bytes,2,rep,name=matchOrders,proto3" json:"matchOrders,omitempty"`
Index int64 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReceiptExchange) Reset() { *m = ReceiptExchange{} }
func (m *ReceiptExchange) String() string { return proto.CompactTextString(m) }
func (*ReceiptExchange) ProtoMessage() {}
func (*ReceiptExchange) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{14} }
func (m *ReceiptExchange) Reset() { *m = ReceiptExchange{} }
func (m *ReceiptExchange) String() string { return proto.CompactTextString(m) }
func (*ReceiptExchange) ProtoMessage() {}
func (*ReceiptExchange) Descriptor() ([]byte, []int) {
return fileDescriptor_e0328a4f16f87ea1, []int{14}
}
func (m *ReceiptExchange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptExchange.Unmarshal(m, b)
}
func (m *ReceiptExchange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReceiptExchange.Marshal(b, m, deterministic)
}
func (m *ReceiptExchange) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReceiptExchange.Merge(m, src)
}
func (m *ReceiptExchange) XXX_Size() int {
return xxx_messageInfo_ReceiptExchange.Size(m)
}
func (m *ReceiptExchange) XXX_DiscardUnknown() {
xxx_messageInfo_ReceiptExchange.DiscardUnknown(m)
}
var xxx_messageInfo_ReceiptExchange proto.InternalMessageInfo
func (m *ReceiptExchange) GetOrder() *Order {
if m != nil {
......@@ -895,47 +1070,11 @@ func init() {
proto.RegisterType((*ReceiptExchange)(nil), "types.ReceiptExchange")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// Client API for Exchange service
type ExchangeClient interface {
}
type exchangeClient struct {
cc *grpc.ClientConn
}
func NewExchangeClient(cc *grpc.ClientConn) ExchangeClient {
return &exchangeClient{cc}
}
// Server API for Exchange service
type ExchangeServer interface {
}
func RegisterExchangeServer(s *grpc.Server, srv ExchangeServer) {
s.RegisterService(&_Exchange_serviceDesc, srv)
}
var _Exchange_serviceDesc = grpc.ServiceDesc{
ServiceName: "types.exchange",
HandlerType: (*ExchangeServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{},
Metadata: "exchange.proto",
func init() {
proto.RegisterFile("exchange.proto", fileDescriptor_e0328a4f16f87ea1)
}
func init() { proto.RegisterFile("exchange.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{
var fileDescriptor_e0328a4f16f87ea1 = []byte{
// 667 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xb4, 0x55, 0xdd, 0x6e, 0xd3, 0x4a,
0x10, 0xae, 0xed, 0x38, 0xa9, 0x27, 0x47, 0xe9, 0x39, 0xab, 0x73, 0x8e, 0x2c, 0x40, 0xa8, 0xf2,
......@@ -980,3 +1119,45 @@ var fileDescriptor0 = []byte{
0x73, 0x2b, 0xec, 0x80, 0xbe, 0xca, 0xcc, 0x5f, 0x4f, 0xba, 0xf4, 0xfa, 0xef, 0xfe, 0x0c, 0x00,
0x00, 0xff, 0xff, 0xf2, 0x3c, 0xac, 0xed, 0x0f, 0x08, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// ExchangeClient is the client API for Exchange service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type ExchangeClient interface {
}
type exchangeClient struct {
cc grpc.ClientConnInterface
}
func NewExchangeClient(cc grpc.ClientConnInterface) ExchangeClient {
return &exchangeClient{cc}
}
// ExchangeServer is the server API for Exchange service.
type ExchangeServer interface {
}
// UnimplementedExchangeServer can be embedded to have forward compatible implementations.
type UnimplementedExchangeServer struct {
}
func RegisterExchangeServer(s *grpc.Server, srv ExchangeServer) {
s.RegisterService(&_Exchange_serviceDesc, srv)
}
var _Exchange_serviceDesc = grpc.ServiceDesc{
ServiceName: "types.exchange",
HandlerType: (*ExchangeServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{},
Metadata: "exchange.proto",
}
......@@ -4,14 +4,11 @@
package types
import (
context "context"
fmt "fmt"
proto "github.com/golang/protobuf/proto"
math "math"
context "golang.org/x/net/context"
proto "github.com/golang/protobuf/proto"
grpc "google.golang.org/grpc"
)
......@@ -24,9 +21,9 @@ var _ = math.Inf
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
const _ = proto.ProtoPackageIsVersion3 // please upgrade the proto package
// 后面如果有其他数据模型可继续往上面添加
//后面如果有其他数据模型可继续往上面添加
type Storage struct {
// Types that are valid to be assigned to Value:
// *Storage_ContentStorage
......@@ -44,16 +41,17 @@ func (m *Storage) Reset() { *m = Storage{} }
func (m *Storage) String() string { return proto.CompactTextString(m) }
func (*Storage) ProtoMessage() {}
func (*Storage) Descriptor() ([]byte, []int) {
return fileDescriptor_storage_919e542fa62fc0e7, []int{0}
return fileDescriptor_0d2c4ccf1453ffdb, []int{0}
}
func (m *Storage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Storage.Unmarshal(m, b)
}
func (m *Storage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Storage.Marshal(b, m, deterministic)
}
func (dst *Storage) XXX_Merge(src proto.Message) {
xxx_messageInfo_Storage.Merge(dst, src)
func (m *Storage) XXX_Merge(src proto.Message) {
xxx_messageInfo_Storage.Merge(m, src)
}
func (m *Storage) XXX_Size() int {
return xxx_messageInfo_Storage.Size(m)
......@@ -71,23 +69,31 @@ type isStorage_Value interface {
type Storage_ContentStorage struct {
ContentStorage *ContentOnlyNotaryStorage `protobuf:"bytes,1,opt,name=contentStorage,proto3,oneof"`
}
type Storage_HashStorage struct {
HashStorage *HashOnlyNotaryStorage `protobuf:"bytes,2,opt,name=hashStorage,proto3,oneof"`
}
type Storage_LinkStorage struct {
LinkStorage *LinkNotaryStorage `protobuf:"bytes,3,opt,name=linkStorage,proto3,oneof"`
}
type Storage_EncryptStorage struct {
EncryptStorage *EncryptNotaryStorage `protobuf:"bytes,4,opt,name=encryptStorage,proto3,oneof"`
}
type Storage_EncryptShareStorage struct {
EncryptShareStorage *EncryptShareNotaryStorage `protobuf:"bytes,5,opt,name=encryptShareStorage,proto3,oneof"`
}
func (*Storage_ContentStorage) isStorage_Value() {}
func (*Storage_HashStorage) isStorage_Value() {}
func (*Storage_LinkStorage) isStorage_Value() {}
func (*Storage_EncryptStorage) isStorage_Value() {}
func (*Storage_ContentStorage) isStorage_Value() {}
func (*Storage_HashStorage) isStorage_Value() {}
func (*Storage_LinkStorage) isStorage_Value() {}
func (*Storage_EncryptStorage) isStorage_Value() {}
func (*Storage_EncryptShareStorage) isStorage_Value() {}
func (m *Storage) GetValue() isStorage_Value {
......@@ -132,9 +138,9 @@ func (m *Storage) GetEncryptShareStorage() *EncryptShareNotaryStorage {
return nil
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*Storage) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _Storage_OneofMarshaler, _Storage_OneofUnmarshaler, _Storage_OneofSizer, []interface{}{
// XXX_OneofWrappers is for the internal use of the proto package.
func (*Storage) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*Storage_ContentStorage)(nil),
(*Storage_HashStorage)(nil),
(*Storage_LinkStorage)(nil),
......@@ -143,126 +149,6 @@ func (*Storage) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error
}
}
func _Storage_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*Storage)
// value
switch x := m.Value.(type) {
case *Storage_ContentStorage:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ContentStorage); err != nil {
return err
}
case *Storage_HashStorage:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.HashStorage); err != nil {
return err
}
case *Storage_LinkStorage:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.LinkStorage); err != nil {
return err
}
case *Storage_EncryptStorage:
b.EncodeVarint(4<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.EncryptStorage); err != nil {
return err
}
case *Storage_EncryptShareStorage:
b.EncodeVarint(5<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.EncryptShareStorage); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("Storage.Value has unexpected type %T", x)
}
return nil
}
func _Storage_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*Storage)
switch tag {
case 1: // value.contentStorage
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ContentOnlyNotaryStorage)
err := b.DecodeMessage(msg)
m.Value = &Storage_ContentStorage{msg}
return true, err
case 2: // value.hashStorage
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(HashOnlyNotaryStorage)
err := b.DecodeMessage(msg)
m.Value = &Storage_HashStorage{msg}
return true, err
case 3: // value.linkStorage
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(LinkNotaryStorage)
err := b.DecodeMessage(msg)
m.Value = &Storage_LinkStorage{msg}
return true, err
case 4: // value.encryptStorage
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(EncryptNotaryStorage)
err := b.DecodeMessage(msg)
m.Value = &Storage_EncryptStorage{msg}
return true, err
case 5: // value.encryptShareStorage
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(EncryptShareNotaryStorage)
err := b.DecodeMessage(msg)
m.Value = &Storage_EncryptShareStorage{msg}
return true, err
default:
return false, nil
}
}
func _Storage_OneofSizer(msg proto.Message) (n int) {
m := msg.(*Storage)
// value
switch x := m.Value.(type) {
case *Storage_ContentStorage:
s := proto.Size(x.ContentStorage)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Storage_HashStorage:
s := proto.Size(x.HashStorage)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Storage_LinkStorage:
s := proto.Size(x.LinkStorage)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Storage_EncryptStorage:
s := proto.Size(x.EncryptStorage)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *Storage_EncryptShareStorage:
s := proto.Size(x.EncryptShareStorage)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
type StorageAction struct {
// Types that are valid to be assigned to Value:
// *StorageAction_ContentStorage
......@@ -281,16 +167,17 @@ func (m *StorageAction) Reset() { *m = StorageAction{} }
func (m *StorageAction) String() string { return proto.CompactTextString(m) }
func (*StorageAction) ProtoMessage() {}
func (*StorageAction) Descriptor() ([]byte, []int) {
return fileDescriptor_storage_919e542fa62fc0e7, []int{1}
return fileDescriptor_0d2c4ccf1453ffdb, []int{1}
}
func (m *StorageAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_StorageAction.Unmarshal(m, b)
}
func (m *StorageAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_StorageAction.Marshal(b, m, deterministic)
}
func (dst *StorageAction) XXX_Merge(src proto.Message) {
xxx_messageInfo_StorageAction.Merge(dst, src)
func (m *StorageAction) XXX_Merge(src proto.Message) {
xxx_messageInfo_StorageAction.Merge(m, src)
}
func (m *StorageAction) XXX_Size() int {
return xxx_messageInfo_StorageAction.Size(m)
......@@ -308,23 +195,31 @@ type isStorageAction_Value interface {
type StorageAction_ContentStorage struct {
ContentStorage *ContentOnlyNotaryStorage `protobuf:"bytes,1,opt,name=contentStorage,proto3,oneof"`
}
type StorageAction_HashStorage struct {
HashStorage *HashOnlyNotaryStorage `protobuf:"bytes,2,opt,name=hashStorage,proto3,oneof"`
}
type StorageAction_LinkStorage struct {
LinkStorage *LinkNotaryStorage `protobuf:"bytes,3,opt,name=linkStorage,proto3,oneof"`
}
type StorageAction_EncryptStorage struct {
EncryptStorage *EncryptNotaryStorage `protobuf:"bytes,4,opt,name=encryptStorage,proto3,oneof"`
}
type StorageAction_EncryptShareStorage struct {
EncryptShareStorage *EncryptShareNotaryStorage `protobuf:"bytes,5,opt,name=encryptShareStorage,proto3,oneof"`
}
func (*StorageAction_ContentStorage) isStorageAction_Value() {}
func (*StorageAction_HashStorage) isStorageAction_Value() {}
func (*StorageAction_LinkStorage) isStorageAction_Value() {}
func (*StorageAction_EncryptStorage) isStorageAction_Value() {}
func (*StorageAction_ContentStorage) isStorageAction_Value() {}
func (*StorageAction_HashStorage) isStorageAction_Value() {}
func (*StorageAction_LinkStorage) isStorageAction_Value() {}
func (*StorageAction_EncryptStorage) isStorageAction_Value() {}
func (*StorageAction_EncryptShareStorage) isStorageAction_Value() {}
func (m *StorageAction) GetValue() isStorageAction_Value {
......@@ -376,9 +271,9 @@ func (m *StorageAction) GetTy() int32 {
return 0
}
// XXX_OneofFuncs is for the internal use of the proto package.
func (*StorageAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer) error, func(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error), func(msg proto.Message) (n int), []interface{}) {
return _StorageAction_OneofMarshaler, _StorageAction_OneofUnmarshaler, _StorageAction_OneofSizer, []interface{}{
// XXX_OneofWrappers is for the internal use of the proto package.
func (*StorageAction) XXX_OneofWrappers() []interface{} {
return []interface{}{
(*StorageAction_ContentStorage)(nil),
(*StorageAction_HashStorage)(nil),
(*StorageAction_LinkStorage)(nil),
......@@ -387,129 +282,9 @@ func (*StorageAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer)
}
}
func _StorageAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
m := msg.(*StorageAction)
// value
switch x := m.Value.(type) {
case *StorageAction_ContentStorage:
b.EncodeVarint(1<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.ContentStorage); err != nil {
return err
}
case *StorageAction_HashStorage:
b.EncodeVarint(2<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.HashStorage); err != nil {
return err
}
case *StorageAction_LinkStorage:
b.EncodeVarint(3<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.LinkStorage); err != nil {
return err
}
case *StorageAction_EncryptStorage:
b.EncodeVarint(4<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.EncryptStorage); err != nil {
return err
}
case *StorageAction_EncryptShareStorage:
b.EncodeVarint(5<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.EncryptShareStorage); err != nil {
return err
}
case nil:
default:
return fmt.Errorf("StorageAction.Value has unexpected type %T", x)
}
return nil
}
func _StorageAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto.Buffer) (bool, error) {
m := msg.(*StorageAction)
switch tag {
case 1: // value.contentStorage
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(ContentOnlyNotaryStorage)
err := b.DecodeMessage(msg)
m.Value = &StorageAction_ContentStorage{msg}
return true, err
case 2: // value.hashStorage
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(HashOnlyNotaryStorage)
err := b.DecodeMessage(msg)
m.Value = &StorageAction_HashStorage{msg}
return true, err
case 3: // value.linkStorage
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(LinkNotaryStorage)
err := b.DecodeMessage(msg)
m.Value = &StorageAction_LinkStorage{msg}
return true, err
case 4: // value.encryptStorage
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(EncryptNotaryStorage)
err := b.DecodeMessage(msg)
m.Value = &StorageAction_EncryptStorage{msg}
return true, err
case 5: // value.encryptShareStorage
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(EncryptShareNotaryStorage)
err := b.DecodeMessage(msg)
m.Value = &StorageAction_EncryptShareStorage{msg}
return true, err
default:
return false, nil
}
}
func _StorageAction_OneofSizer(msg proto.Message) (n int) {
m := msg.(*StorageAction)
// value
switch x := m.Value.(type) {
case *StorageAction_ContentStorage:
s := proto.Size(x.ContentStorage)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *StorageAction_HashStorage:
s := proto.Size(x.HashStorage)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *StorageAction_LinkStorage:
s := proto.Size(x.LinkStorage)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *StorageAction_EncryptStorage:
s := proto.Size(x.EncryptStorage)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case *StorageAction_EncryptShareStorage:
s := proto.Size(x.EncryptShareStorage)
n += 1 // tag and wire
n += proto.SizeVarint(uint64(s))
n += s
case nil:
default:
panic(fmt.Sprintf("proto: unexpected type %T in oneof", x))
}
return n
}
// 内容存证模型
type ContentOnlyNotaryStorage struct {
// 长度需要小于512k
//长度需要小于512k
Content []byte `protobuf:"bytes,1,opt,name=content,proto3" json:"content,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
......@@ -520,16 +295,17 @@ func (m *ContentOnlyNotaryStorage) Reset() { *m = ContentOnlyNotaryStora
func (m *ContentOnlyNotaryStorage) String() string { return proto.CompactTextString(m) }
func (*ContentOnlyNotaryStorage) ProtoMessage() {}
func (*ContentOnlyNotaryStorage) Descriptor() ([]byte, []int) {
return fileDescriptor_storage_919e542fa62fc0e7, []int{2}
return fileDescriptor_0d2c4ccf1453ffdb, []int{2}
}
func (m *ContentOnlyNotaryStorage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ContentOnlyNotaryStorage.Unmarshal(m, b)
}
func (m *ContentOnlyNotaryStorage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ContentOnlyNotaryStorage.Marshal(b, m, deterministic)
}
func (dst *ContentOnlyNotaryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_ContentOnlyNotaryStorage.Merge(dst, src)
func (m *ContentOnlyNotaryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_ContentOnlyNotaryStorage.Merge(m, src)
}
func (m *ContentOnlyNotaryStorage) XXX_Size() int {
return xxx_messageInfo_ContentOnlyNotaryStorage.Size(m)
......@@ -547,9 +323,9 @@ func (m *ContentOnlyNotaryStorage) GetContent() []byte {
return nil
}
// 哈希存证模型,推荐使用sha256哈希,限制256位得摘要值
//哈希存证模型,推荐使用sha256哈希,限制256位得摘要值
type HashOnlyNotaryStorage struct {
// 长度固定为32字节
//长度固定为32字节
Hash []byte `protobuf:"bytes,1,opt,name=hash,proto3" json:"hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
......@@ -560,16 +336,17 @@ func (m *HashOnlyNotaryStorage) Reset() { *m = HashOnlyNotaryStorage{} }
func (m *HashOnlyNotaryStorage) String() string { return proto.CompactTextString(m) }
func (*HashOnlyNotaryStorage) ProtoMessage() {}
func (*HashOnlyNotaryStorage) Descriptor() ([]byte, []int) {
return fileDescriptor_storage_919e542fa62fc0e7, []int{3}
return fileDescriptor_0d2c4ccf1453ffdb, []int{3}
}
func (m *HashOnlyNotaryStorage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_HashOnlyNotaryStorage.Unmarshal(m, b)
}
func (m *HashOnlyNotaryStorage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_HashOnlyNotaryStorage.Marshal(b, m, deterministic)
}
func (dst *HashOnlyNotaryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_HashOnlyNotaryStorage.Merge(dst, src)
func (m *HashOnlyNotaryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_HashOnlyNotaryStorage.Merge(m, src)
}
func (m *HashOnlyNotaryStorage) XXX_Size() int {
return xxx_messageInfo_HashOnlyNotaryStorage.Size(m)
......@@ -589,9 +366,9 @@ func (m *HashOnlyNotaryStorage) GetHash() []byte {
// 链接存证模型
type LinkNotaryStorage struct {
// 存证内容的链接,可以写入URL,或者其他可用于定位源文件得线索.
//存证内容的链接,可以写入URL,或者其他可用于定位源文件得线索.
Link []byte `protobuf:"bytes,1,opt,name=link,proto3" json:"link,omitempty"`
// 源文件得hash值,推荐使用sha256哈希,限制256位得摘要值
//源文件得hash值,推荐使用sha256哈希,限制256位得摘要值
Hash []byte `protobuf:"bytes,2,opt,name=hash,proto3" json:"hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
......@@ -602,16 +379,17 @@ func (m *LinkNotaryStorage) Reset() { *m = LinkNotaryStorage{} }
func (m *LinkNotaryStorage) String() string { return proto.CompactTextString(m) }
func (*LinkNotaryStorage) ProtoMessage() {}
func (*LinkNotaryStorage) Descriptor() ([]byte, []int) {
return fileDescriptor_storage_919e542fa62fc0e7, []int{4}
return fileDescriptor_0d2c4ccf1453ffdb, []int{4}
}
func (m *LinkNotaryStorage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LinkNotaryStorage.Unmarshal(m, b)
}
func (m *LinkNotaryStorage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LinkNotaryStorage.Marshal(b, m, deterministic)
}
func (dst *LinkNotaryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_LinkNotaryStorage.Merge(dst, src)
func (m *LinkNotaryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_LinkNotaryStorage.Merge(m, src)
}
func (m *LinkNotaryStorage) XXX_Size() int {
return xxx_messageInfo_LinkNotaryStorage.Size(m)
......@@ -638,11 +416,11 @@ func (m *LinkNotaryStorage) GetHash() []byte {
// 隐私存证模型,如果一个文件需要存证,且不公开内容,可以选择将源文件通过对称加密算法加密后上链
type EncryptNotaryStorage struct {
// 存证明文内容的hash值,推荐使用sha256哈希,限制256位得摘要值
//存证明文内容的hash值,推荐使用sha256哈希,限制256位得摘要值
ContentHash []byte `protobuf:"bytes,1,opt,name=contentHash,proto3" json:"contentHash,omitempty"`
// 源文件得密文,由加密key及nonce对明文加密得到该值。
//源文件得密文,由加密key及nonce对明文加密得到该值。
EncryptContent []byte `protobuf:"bytes,2,opt,name=encryptContent,proto3" json:"encryptContent,omitempty"`
// 加密iv,通过AES进行加密时制定随机生成的iv,解密时需要使用该值
//加密iv,通过AES进行加密时制定随机生成的iv,解密时需要使用该值
Nonce []byte `protobuf:"bytes,3,opt,name=nonce,proto3" json:"nonce,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
......@@ -653,16 +431,17 @@ func (m *EncryptNotaryStorage) Reset() { *m = EncryptNotaryStorage{} }
func (m *EncryptNotaryStorage) String() string { return proto.CompactTextString(m) }
func (*EncryptNotaryStorage) ProtoMessage() {}
func (*EncryptNotaryStorage) Descriptor() ([]byte, []int) {
return fileDescriptor_storage_919e542fa62fc0e7, []int{5}
return fileDescriptor_0d2c4ccf1453ffdb, []int{5}
}
func (m *EncryptNotaryStorage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EncryptNotaryStorage.Unmarshal(m, b)
}
func (m *EncryptNotaryStorage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EncryptNotaryStorage.Marshal(b, m, deterministic)
}
func (dst *EncryptNotaryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_EncryptNotaryStorage.Merge(dst, src)
func (m *EncryptNotaryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_EncryptNotaryStorage.Merge(m, src)
}
func (m *EncryptNotaryStorage) XXX_Size() int {
return xxx_messageInfo_EncryptNotaryStorage.Size(m)
......@@ -696,11 +475,11 @@ func (m *EncryptNotaryStorage) GetNonce() []byte {
// 隐私存证模型
type EncryptContentOnlyNotaryStorage struct {
// 存证内容的hash值,推荐使用sha256哈希,限制256位得摘要值
//存证内容的hash值,推荐使用sha256哈希,限制256位得摘要值
// bytes contentHash = 1;
// 源文件得密文。
//源文件得密文。
EncryptContent []byte `protobuf:"bytes,1,opt,name=encryptContent,proto3" json:"encryptContent,omitempty"`
// 加密iv,通过AES进行加密时制定随机生成的iv,解密时需要使用该值
//加密iv,通过AES进行加密时制定随机生成的iv,解密时需要使用该值
Nonce []byte `protobuf:"bytes,2,opt,name=nonce,proto3" json:"nonce,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
......@@ -711,16 +490,17 @@ func (m *EncryptContentOnlyNotaryStorage) Reset() { *m = EncryptContentO
func (m *EncryptContentOnlyNotaryStorage) String() string { return proto.CompactTextString(m) }
func (*EncryptContentOnlyNotaryStorage) ProtoMessage() {}
func (*EncryptContentOnlyNotaryStorage) Descriptor() ([]byte, []int) {
return fileDescriptor_storage_919e542fa62fc0e7, []int{6}
return fileDescriptor_0d2c4ccf1453ffdb, []int{6}
}
func (m *EncryptContentOnlyNotaryStorage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EncryptContentOnlyNotaryStorage.Unmarshal(m, b)
}
func (m *EncryptContentOnlyNotaryStorage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EncryptContentOnlyNotaryStorage.Marshal(b, m, deterministic)
}
func (dst *EncryptContentOnlyNotaryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_EncryptContentOnlyNotaryStorage.Merge(dst, src)
func (m *EncryptContentOnlyNotaryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_EncryptContentOnlyNotaryStorage.Merge(m, src)
}
func (m *EncryptContentOnlyNotaryStorage) XXX_Size() int {
return xxx_messageInfo_EncryptContentOnlyNotaryStorage.Size(m)
......@@ -747,16 +527,16 @@ func (m *EncryptContentOnlyNotaryStorage) GetNonce() []byte {
// 分享隐私存证模型,需要完备的sdk或者相应的密钥库支持
type EncryptShareNotaryStorage struct {
// 存证明文内容的hash值,推荐使用sha256哈希,限制256位得摘要值
//存证明文内容的hash值,推荐使用sha256哈希,限制256位得摘要值
ContentHash []byte `protobuf:"bytes,1,opt,name=contentHash,proto3" json:"contentHash,omitempty"`
// 源文件得密文。
//源文件得密文。
EncryptContent []byte `protobuf:"bytes,2,opt,name=encryptContent,proto3" json:"encryptContent,omitempty"`
// 密钥的kdf推导路径。密钥tree父节点根据该路径可以推导出私钥key
//密钥的kdf推导路径。密钥tree父节点根据该路径可以推导出私钥key
KeyName []byte `protobuf:"bytes,3,opt,name=keyName,proto3" json:"keyName,omitempty"`
// 加密key的wrap key。加密key随机生成,对明文进行加密,该key有私密key进行key wrap后公开。
// 使用时,通过私密key对wrap key解密得到加密key对密文进行解密。
//加密key的wrap key。加密key随机生成,对明文进行加密,该key有私密key进行key wrap后公开。
//使用时,通过私密key对wrap key解密得到加密key对密文进行解密。
KeyWrap []byte `protobuf:"bytes,4,opt,name=keyWrap,proto3" json:"keyWrap,omitempty"`
// 加密iv,通过AES进行加密时制定随机生成的iv,解密时需要使用该值
//加密iv,通过AES进行加密时制定随机生成的iv,解密时需要使用该值
Nonce []byte `protobuf:"bytes,5,opt,name=nonce,proto3" json:"nonce,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
......@@ -767,16 +547,17 @@ func (m *EncryptShareNotaryStorage) Reset() { *m = EncryptShareNotarySto
func (m *EncryptShareNotaryStorage) String() string { return proto.CompactTextString(m) }
func (*EncryptShareNotaryStorage) ProtoMessage() {}
func (*EncryptShareNotaryStorage) Descriptor() ([]byte, []int) {
return fileDescriptor_storage_919e542fa62fc0e7, []int{7}
return fileDescriptor_0d2c4ccf1453ffdb, []int{7}
}
func (m *EncryptShareNotaryStorage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_EncryptShareNotaryStorage.Unmarshal(m, b)
}
func (m *EncryptShareNotaryStorage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_EncryptShareNotaryStorage.Marshal(b, m, deterministic)
}
func (dst *EncryptShareNotaryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_EncryptShareNotaryStorage.Merge(dst, src)
func (m *EncryptShareNotaryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_EncryptShareNotaryStorage.Merge(m, src)
}
func (m *EncryptShareNotaryStorage) XXX_Size() int {
return xxx_messageInfo_EncryptShareNotaryStorage.Size(m)
......@@ -822,7 +603,7 @@ func (m *EncryptShareNotaryStorage) GetNonce() []byte {
return nil
}
// 根据txhash去状态数据库中查询存储内容
//根据txhash去状态数据库中查询存储内容
type QueryStorage struct {
TxHash string `protobuf:"bytes,1,opt,name=txHash,proto3" json:"txHash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
......@@ -834,16 +615,17 @@ func (m *QueryStorage) Reset() { *m = QueryStorage{} }
func (m *QueryStorage) String() string { return proto.CompactTextString(m) }
func (*QueryStorage) ProtoMessage() {}
func (*QueryStorage) Descriptor() ([]byte, []int) {
return fileDescriptor_storage_919e542fa62fc0e7, []int{8}
return fileDescriptor_0d2c4ccf1453ffdb, []int{8}
}
func (m *QueryStorage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_QueryStorage.Unmarshal(m, b)
}
func (m *QueryStorage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_QueryStorage.Marshal(b, m, deterministic)
}
func (dst *QueryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryStorage.Merge(dst, src)
func (m *QueryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_QueryStorage.Merge(m, src)
}
func (m *QueryStorage) XXX_Size() int {
return xxx_messageInfo_QueryStorage.Size(m)
......@@ -861,7 +643,7 @@ func (m *QueryStorage) GetTxHash() string {
return ""
}
// 批量查询有可能导致数据库崩溃
//批量查询有可能导致数据库崩溃
type BatchQueryStorage struct {
TxHashs []string `protobuf:"bytes,1,rep,name=txHashs,proto3" json:"txHashs,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
......@@ -873,16 +655,17 @@ func (m *BatchQueryStorage) Reset() { *m = BatchQueryStorage{} }
func (m *BatchQueryStorage) String() string { return proto.CompactTextString(m) }
func (*BatchQueryStorage) ProtoMessage() {}
func (*BatchQueryStorage) Descriptor() ([]byte, []int) {
return fileDescriptor_storage_919e542fa62fc0e7, []int{9}
return fileDescriptor_0d2c4ccf1453ffdb, []int{9}
}
func (m *BatchQueryStorage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BatchQueryStorage.Unmarshal(m, b)
}
func (m *BatchQueryStorage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BatchQueryStorage.Marshal(b, m, deterministic)
}
func (dst *BatchQueryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_BatchQueryStorage.Merge(dst, src)
func (m *BatchQueryStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_BatchQueryStorage.Merge(m, src)
}
func (m *BatchQueryStorage) XXX_Size() int {
return xxx_messageInfo_BatchQueryStorage.Size(m)
......@@ -911,16 +694,17 @@ func (m *BatchReplyStorage) Reset() { *m = BatchReplyStorage{} }
func (m *BatchReplyStorage) String() string { return proto.CompactTextString(m) }
func (*BatchReplyStorage) ProtoMessage() {}
func (*BatchReplyStorage) Descriptor() ([]byte, []int) {
return fileDescriptor_storage_919e542fa62fc0e7, []int{10}
return fileDescriptor_0d2c4ccf1453ffdb, []int{10}
}
func (m *BatchReplyStorage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_BatchReplyStorage.Unmarshal(m, b)
}
func (m *BatchReplyStorage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_BatchReplyStorage.Marshal(b, m, deterministic)
}
func (dst *BatchReplyStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_BatchReplyStorage.Merge(dst, src)
func (m *BatchReplyStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_BatchReplyStorage.Merge(m, src)
}
func (m *BatchReplyStorage) XXX_Size() int {
return xxx_messageInfo_BatchReplyStorage.Size(m)
......@@ -948,16 +732,17 @@ func (m *ReceiptStorage) Reset() { *m = ReceiptStorage{} }
func (m *ReceiptStorage) String() string { return proto.CompactTextString(m) }
func (*ReceiptStorage) ProtoMessage() {}
func (*ReceiptStorage) Descriptor() ([]byte, []int) {
return fileDescriptor_storage_919e542fa62fc0e7, []int{11}
return fileDescriptor_0d2c4ccf1453ffdb, []int{11}
}
func (m *ReceiptStorage) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptStorage.Unmarshal(m, b)
}
func (m *ReceiptStorage) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReceiptStorage.Marshal(b, m, deterministic)
}
func (dst *ReceiptStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReceiptStorage.Merge(dst, src)
func (m *ReceiptStorage) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReceiptStorage.Merge(m, src)
}
func (m *ReceiptStorage) XXX_Size() int {
return xxx_messageInfo_ReceiptStorage.Size(m)
......@@ -983,47 +768,11 @@ func init() {
proto.RegisterType((*ReceiptStorage)(nil), "types.ReceiptStorage")
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConn
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion4
// StorageClient is the client API for Storage service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type StorageClient interface {
}
type storageClient struct {
cc *grpc.ClientConn
}
func NewStorageClient(cc *grpc.ClientConn) StorageClient {
return &storageClient{cc}
}
// StorageServer is the server API for Storage service.
type StorageServer interface {
}
func RegisterStorageServer(s *grpc.Server, srv StorageServer) {
s.RegisterService(&_Storage_serviceDesc, srv)
}
var _Storage_serviceDesc = grpc.ServiceDesc{
ServiceName: "types.storage",
HandlerType: (*StorageServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{},
Metadata: "storage.proto",
func init() {
proto.RegisterFile("storage.proto", fileDescriptor_0d2c4ccf1453ffdb)
}
func init() { proto.RegisterFile("storage.proto", fileDescriptor_storage_919e542fa62fc0e7) }
var fileDescriptor_storage_919e542fa62fc0e7 = []byte{
var fileDescriptor_0d2c4ccf1453ffdb = []byte{
// 471 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0xec, 0x54, 0xcf, 0x8b, 0xd3, 0x40,
0x14, 0x36, 0xe9, 0xa6, 0xb1, 0x2f, 0xdd, 0xe0, 0x8e, 0xab, 0x8c, 0x28, 0x6c, 0x98, 0xc3, 0x52,
......@@ -1056,3 +805,45 @@ var fileDescriptor_storage_919e542fa62fc0e7 = []byte{
0x1b, 0x41, 0x88, 0xe8, 0x97, 0xa1, 0xf9, 0xfb, 0x3f, 0xf9, 0x1d, 0x00, 0x00, 0xff, 0xff, 0x9e,
0x3b, 0x2b, 0xb0, 0x0e, 0x06, 0x00, 0x00,
}
// Reference imports to suppress errors if they are not otherwise used.
var _ context.Context
var _ grpc.ClientConnInterface
// This is a compile-time assertion to ensure that this generated file
// is compatible with the grpc package it is being compiled against.
const _ = grpc.SupportPackageIsVersion6
// StorageClient is the client API for Storage service.
//
// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
type StorageClient interface {
}
type storageClient struct {
cc grpc.ClientConnInterface
}
func NewStorageClient(cc grpc.ClientConnInterface) StorageClient {
return &storageClient{cc}
}
// StorageServer is the server API for Storage service.
type StorageServer interface {
}
// UnimplementedStorageServer can be embedded to have forward compatible implementations.
type UnimplementedStorageServer struct {
}
func RegisterStorageServer(s *grpc.Server, srv StorageServer) {
s.RegisterService(&_Storage_serviceDesc, srv)
}
var _Storage_serviceDesc = grpc.ServiceDesc{
ServiceName: "types.storage",
HandlerType: (*StorageServer)(nil),
Methods: []grpc.MethodDesc{},
Streams: []grpc.StreamDesc{},
Metadata: "storage.proto",
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment