types

package
Version: v1.65.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Oct 19, 2021 License: BSD-3-Clause Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TyUnknowAction = iota + 200
	TyLimitOrderAction
	TyMarketOrderAction
	TyRevokeOrderAction

	NameLimitOrderAction  = "LimitOrder"
	NameMarketOrderAction = "MarketOrder"
	NameRevokeOrderAction = "RevokeOrder"

	FuncNameQueryMarketDepth      = "QueryMarketDepth"
	FuncNameQueryHistoryOrderList = "QueryHistoryOrderList"
	FuncNameQueryOrder            = "QueryOrder"
	FuncNameQueryOrderList        = "QueryOrderList"
)

action类型id和name,这些常量可以自定义修改

View Source
const (
	TyUnknownLog = iota + 200
	TyLimitOrderLog
	TyMarketOrderLog
	TyRevokeOrderLog
)

log类型id值

View Source
const (
	OpBuy = iota + 1
	OpSell
)

OP

View Source
const (
	Ordered = iota
	Completed
	Revoked
)

order status

View Source
const (
	ListDESC = int32(0)
	ListASC  = int32(1)
	ListSeek = int32(2)
)

const

View Source
const (
	//Count 单次list还回条数
	Count = int32(10)
	//MaxMatchCount 系统最大撮合深度
	MaxMatchCount = 100
)

Variables

View Source
var (
	ErrAssetAmount  = fmt.Errorf("%s", "The asset amount is not valid!")
	ErrAssetPrice   = fmt.Errorf("%s", "The asset price is not valid!")
	ErrAssetOp      = fmt.Errorf("%s", "The asset op is not define!")
	ErrAssetBalance = fmt.Errorf("%s", "Insufficient balance!")
	ErrOrderSatus   = fmt.Errorf("%s", "The order status is reovked or completed!")
	ErrAddr         = fmt.Errorf("%s", "Wrong Addr!")
	ErrAsset        = fmt.Errorf("%s", "The asset's execer or symbol can't be nil,The same assets cannot be exchanged!")
	ErrCount        = fmt.Errorf("%s", "The param count can't large  20")
	ErrDirection    = fmt.Errorf("%s", "The direction only 0 or 1!")
	ErrStatus       = fmt.Errorf("%s", "The status only in  0 , 1, 2!")
	ErrOrderID      = fmt.Errorf("%s", "Wrong OrderID!")
)

some errors definition

View Source
var (
	//ExchangeX 执行器名称定义
	ExchangeX = "exchange"
)
View Source
var File_exchange_proto protoreflect.FileDescriptor

Functions

func InitExecutor

func InitExecutor(cfg *types.Chain33Config)

InitExecutor defines register executor

func InitFork

func InitFork(cfg *types.Chain33Config)

InitFork defines register fork

func RegisterExchangeServer

func RegisterExchangeServer(s *grpc.Server, srv ExchangeServer)

Types

type Asset

type Asset struct {
	Execer string `protobuf:"bytes,1,opt,name=execer,proto3" json:"execer,omitempty"`
	Symbol string `protobuf:"bytes,2,opt,name=symbol,proto3" json:"symbol,omitempty"`
	// contains filtered or unexported fields
}

资产类型

func (*Asset) Descriptor deprecated

func (*Asset) Descriptor() ([]byte, []int)

Deprecated: Use Asset.ProtoReflect.Descriptor instead.

func (*Asset) GetExecer

func (x *Asset) GetExecer() string

func (*Asset) GetSymbol

func (x *Asset) GetSymbol() string

func (*Asset) ProtoMessage

func (*Asset) ProtoMessage()

func (*Asset) ProtoReflect added in v1.65.3

func (x *Asset) ProtoReflect() protoreflect.Message

func (*Asset) Reset

func (x *Asset) Reset()

func (*Asset) String

func (x *Asset) String() string

type Exchange

type Exchange struct {
	// contains filtered or unexported fields
}

func (*Exchange) Descriptor deprecated

func (*Exchange) Descriptor() ([]byte, []int)

Deprecated: Use Exchange.ProtoReflect.Descriptor instead.

func (*Exchange) ProtoMessage

func (*Exchange) ProtoMessage()

func (*Exchange) ProtoReflect added in v1.65.3

func (x *Exchange) ProtoReflect() protoreflect.Message

func (*Exchange) Reset

func (x *Exchange) Reset()

func (*Exchange) String

func (x *Exchange) String() string

type ExchangeAction

type ExchangeAction struct {

	// Types that are assignable to Value:
	//	*ExchangeAction_LimitOrder
	//	*ExchangeAction_MarketOrder
	//	*ExchangeAction_RevokeOrder
	Value isExchangeAction_Value `protobuf_oneof:"value"`
	Ty    int32                  `protobuf:"varint,6,opt,name=ty,proto3" json:"ty,omitempty"`
	// contains filtered or unexported fields
}

func (*ExchangeAction) Descriptor deprecated

func (*ExchangeAction) Descriptor() ([]byte, []int)

Deprecated: Use ExchangeAction.ProtoReflect.Descriptor instead.

func (*ExchangeAction) GetLimitOrder

func (x *ExchangeAction) GetLimitOrder() *LimitOrder

func (*ExchangeAction) GetMarketOrder

func (x *ExchangeAction) GetMarketOrder() *MarketOrder

func (*ExchangeAction) GetRevokeOrder

func (x *ExchangeAction) GetRevokeOrder() *RevokeOrder

func (*ExchangeAction) GetTy

func (x *ExchangeAction) GetTy() int32

func (*ExchangeAction) GetValue

func (m *ExchangeAction) GetValue() isExchangeAction_Value

func (*ExchangeAction) ProtoMessage

func (*ExchangeAction) ProtoMessage()

func (*ExchangeAction) ProtoReflect added in v1.65.3

func (x *ExchangeAction) ProtoReflect() protoreflect.Message

func (*ExchangeAction) Reset

func (x *ExchangeAction) Reset()

func (*ExchangeAction) String

func (x *ExchangeAction) String() string

type ExchangeAction_LimitOrder

type ExchangeAction_LimitOrder struct {
	LimitOrder *LimitOrder `protobuf:"bytes,1,opt,name=limitOrder,proto3,oneof"`
}

type ExchangeAction_MarketOrder

type ExchangeAction_MarketOrder struct {
	MarketOrder *MarketOrder `protobuf:"bytes,2,opt,name=marketOrder,proto3,oneof"`
}

type ExchangeAction_RevokeOrder

type ExchangeAction_RevokeOrder struct {
	RevokeOrder *RevokeOrder `protobuf:"bytes,3,opt,name=revokeOrder,proto3,oneof"`
}

type ExchangeClient

type ExchangeClient interface {
}

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.

func NewExchangeClient

func NewExchangeClient(cc grpc.ClientConnInterface) ExchangeClient

type ExchangeServer

type ExchangeServer interface {
}

ExchangeServer is the server API for Exchange service.

type ExchangeType

type ExchangeType struct {
	types.ExecTypeBase
}

ExchangeType ...

func NewType

func NewType(cfg *types.Chain33Config) *ExchangeType

NewType ...

func (*ExchangeType) GetLogMap

func (e *ExchangeType) GetLogMap() map[int64]*types.LogInfo

GetLogMap 获取合约log相关信息

func (*ExchangeType) GetPayload

func (e *ExchangeType) GetPayload() types.Message

GetPayload 获取合约action结构

func (*ExchangeType) GetTypeMap

func (e *ExchangeType) GetTypeMap() map[string]int32

GetTypeMap 获取合约action的id和name信息

type LimitOrder

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"`
	// contains filtered or unexported fields
}

限价订单

func (*LimitOrder) Descriptor deprecated

func (*LimitOrder) Descriptor() ([]byte, []int)

Deprecated: Use LimitOrder.ProtoReflect.Descriptor instead.

func (*LimitOrder) GetAmount

func (x *LimitOrder) GetAmount() int64

func (*LimitOrder) GetLeftAsset

func (x *LimitOrder) GetLeftAsset() *Asset

func (*LimitOrder) GetOp

func (x *LimitOrder) GetOp() int32

func (*LimitOrder) GetPrice

func (x *LimitOrder) GetPrice() int64

func (*LimitOrder) GetRightAsset

func (x *LimitOrder) GetRightAsset() *Asset

func (*LimitOrder) ProtoMessage

func (*LimitOrder) ProtoMessage()

func (*LimitOrder) ProtoReflect added in v1.65.3

func (x *LimitOrder) ProtoReflect() protoreflect.Message

func (*LimitOrder) Reset

func (x *LimitOrder) Reset()

func (*LimitOrder) String

func (x *LimitOrder) String() string

type MarketDepth

type MarketDepth struct {

	//资产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"`
	// contains filtered or unexported fields
}

市场深度

func (*MarketDepth) Descriptor deprecated

func (*MarketDepth) Descriptor() ([]byte, []int)

Deprecated: Use MarketDepth.ProtoReflect.Descriptor instead.

func (*MarketDepth) GetAmount

func (x *MarketDepth) GetAmount() int64

func (*MarketDepth) GetLeftAsset

func (x *MarketDepth) GetLeftAsset() *Asset

func (*MarketDepth) GetOp

func (x *MarketDepth) GetOp() int32

func (*MarketDepth) GetPrice

func (x *MarketDepth) GetPrice() int64

func (*MarketDepth) GetRightAsset

func (x *MarketDepth) GetRightAsset() *Asset

func (*MarketDepth) ProtoMessage

func (*MarketDepth) ProtoMessage()

func (*MarketDepth) ProtoReflect added in v1.65.3

func (x *MarketDepth) ProtoReflect() protoreflect.Message

func (*MarketDepth) Reset

func (x *MarketDepth) Reset()

func (*MarketDepth) String

func (x *MarketDepth) String() string

type MarketDepthList

type MarketDepthList struct {
	List       []*MarketDepth `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
	PrimaryKey string         `protobuf:"bytes,2,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"`
	// contains filtered or unexported fields
}

查询接口返回的市场深度列表

func (*MarketDepthList) Descriptor deprecated

func (*MarketDepthList) Descriptor() ([]byte, []int)

Deprecated: Use MarketDepthList.ProtoReflect.Descriptor instead.

func (*MarketDepthList) GetList

func (x *MarketDepthList) GetList() []*MarketDepth

func (*MarketDepthList) GetPrimaryKey

func (x *MarketDepthList) GetPrimaryKey() string

func (*MarketDepthList) ProtoMessage

func (*MarketDepthList) ProtoMessage()

func (*MarketDepthList) ProtoReflect added in v1.65.3

func (x *MarketDepthList) ProtoReflect() protoreflect.Message

func (*MarketDepthList) Reset

func (x *MarketDepthList) Reset()

func (*MarketDepthList) String

func (x *MarketDepthList) String() string

type MarketOrder

type MarketOrder struct {

	//资产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"`
	// contains filtered or unexported fields
}

市价委托

func (*MarketOrder) Descriptor deprecated

func (*MarketOrder) Descriptor() ([]byte, []int)

Deprecated: Use MarketOrder.ProtoReflect.Descriptor instead.

func (*MarketOrder) GetAmount

func (x *MarketOrder) GetAmount() int64

func (*MarketOrder) GetLeftAsset

func (x *MarketOrder) GetLeftAsset() *Asset

func (*MarketOrder) GetOp

func (x *MarketOrder) GetOp() int32

func (*MarketOrder) GetRightAsset

func (x *MarketOrder) GetRightAsset() *Asset

func (*MarketOrder) ProtoMessage

func (*MarketOrder) ProtoMessage()

func (*MarketOrder) ProtoReflect added in v1.65.3

func (x *MarketOrder) ProtoReflect() protoreflect.Message

func (*MarketOrder) Reset

func (x *MarketOrder) Reset()

func (*MarketOrder) String

func (x *MarketOrder) String() string

type Order

type Order struct {
	OrderID int64 `protobuf:"varint,1,opt,name=orderID,proto3" json:"orderID,omitempty"`
	// Types that are assignable to Value:
	//	*Order_LimitOrder
	//	*Order_MarketOrder
	Value isOrder_Value `protobuf_oneof:"value"`
	//挂单类型
	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"`
	// contains filtered or unexported fields
}

订单信息

func (*Order) Descriptor deprecated

func (*Order) Descriptor() ([]byte, []int)

Deprecated: Use Order.ProtoReflect.Descriptor instead.

func (*Order) GetAVGPrice

func (x *Order) GetAVGPrice() int64

func (*Order) GetAddr

func (x *Order) GetAddr() string

func (*Order) GetBalance

func (x *Order) GetBalance() int64

func (*Order) GetExecuted

func (x *Order) GetExecuted() int64

func (*Order) GetIndex

func (x *Order) GetIndex() int64

func (*Order) GetLimitOrder

func (x *Order) GetLimitOrder() *LimitOrder

func (*Order) GetMarketOrder

func (x *Order) GetMarketOrder() *MarketOrder

func (*Order) GetOrderID

func (x *Order) GetOrderID() int64

func (*Order) GetStatus

func (x *Order) GetStatus() int32

func (*Order) GetTy

func (x *Order) GetTy() int32

func (*Order) GetUpdateTime

func (x *Order) GetUpdateTime() int64

func (*Order) GetValue

func (m *Order) GetValue() isOrder_Value

func (*Order) ProtoMessage

func (*Order) ProtoMessage()

func (*Order) ProtoReflect added in v1.65.3

func (x *Order) ProtoReflect() protoreflect.Message

func (*Order) Reset

func (x *Order) Reset()

func (*Order) String

func (x *Order) String() string

type OrderList

type OrderList struct {
	List       []*Order `protobuf:"bytes,1,rep,name=list,proto3" json:"list,omitempty"`
	PrimaryKey string   `protobuf:"bytes,2,opt,name=primaryKey,proto3" json:"primaryKey,omitempty"`
	// contains filtered or unexported fields
}

订单列表

func (*OrderList) Descriptor deprecated

func (*OrderList) Descriptor() ([]byte, []int)

Deprecated: Use OrderList.ProtoReflect.Descriptor instead.

func (*OrderList) GetList

func (x *OrderList) GetList() []*Order

func (*OrderList) GetPrimaryKey

func (x *OrderList) GetPrimaryKey() string

func (*OrderList) ProtoMessage

func (*OrderList) ProtoMessage()

func (*OrderList) ProtoReflect added in v1.65.3

func (x *OrderList) ProtoReflect() protoreflect.Message

func (*OrderList) Reset

func (x *OrderList) Reset()

func (*OrderList) String

func (x *OrderList) String() string

type Order_LimitOrder

type Order_LimitOrder struct {
	LimitOrder *LimitOrder `protobuf:"bytes,2,opt,name=limitOrder,proto3,oneof"`
}

type Order_MarketOrder

type Order_MarketOrder struct {
	MarketOrder *MarketOrder `protobuf:"bytes,3,opt,name=marketOrder,proto3,oneof"`
}

type QueryHistoryOrderList

type QueryHistoryOrderList struct {

	//资产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,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,proto3" json:"direction,omitempty"`
	// contains filtered or unexported fields
}

查询最新得成交信息,外部接口

func (*QueryHistoryOrderList) Descriptor deprecated

func (*QueryHistoryOrderList) Descriptor() ([]byte, []int)

Deprecated: Use QueryHistoryOrderList.ProtoReflect.Descriptor instead.

func (*QueryHistoryOrderList) GetCount

func (x *QueryHistoryOrderList) GetCount() int32

func (*QueryHistoryOrderList) GetDirection

func (x *QueryHistoryOrderList) GetDirection() int32

func (*QueryHistoryOrderList) GetLeftAsset

func (x *QueryHistoryOrderList) GetLeftAsset() *Asset

func (*QueryHistoryOrderList) GetPrimaryKey

func (x *QueryHistoryOrderList) GetPrimaryKey() string

func (*QueryHistoryOrderList) GetRightAsset

func (x *QueryHistoryOrderList) GetRightAsset() *Asset

func (*QueryHistoryOrderList) ProtoMessage

func (*QueryHistoryOrderList) ProtoMessage()

func (*QueryHistoryOrderList) ProtoReflect added in v1.65.3

func (x *QueryHistoryOrderList) ProtoReflect() protoreflect.Message

func (*QueryHistoryOrderList) Reset

func (x *QueryHistoryOrderList) Reset()

func (*QueryHistoryOrderList) String

func (x *QueryHistoryOrderList) String() string

type QueryMarketDepth

type QueryMarketDepth struct {

	//资产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,proto3" json:"primaryKey,omitempty"`
	//单页返回多少条记录,默认返回10条,为了系统安全最多单次只能返回20条
	Count int32 `protobuf:"varint,5,opt,name=count,proto3" json:"count,omitempty"`
	// contains filtered or unexported fields
}

查询接口

func (*QueryMarketDepth) Descriptor deprecated

func (*QueryMarketDepth) Descriptor() ([]byte, []int)

Deprecated: Use QueryMarketDepth.ProtoReflect.Descriptor instead.

func (*QueryMarketDepth) GetCount

func (x *QueryMarketDepth) GetCount() int32

func (*QueryMarketDepth) GetLeftAsset

func (x *QueryMarketDepth) GetLeftAsset() *Asset

func (*QueryMarketDepth) GetOp

func (x *QueryMarketDepth) GetOp() int32

func (*QueryMarketDepth) GetPrimaryKey

func (x *QueryMarketDepth) GetPrimaryKey() string

func (*QueryMarketDepth) GetRightAsset

func (x *QueryMarketDepth) GetRightAsset() *Asset

func (*QueryMarketDepth) ProtoMessage

func (*QueryMarketDepth) ProtoMessage()

func (*QueryMarketDepth) ProtoReflect added in v1.65.3

func (x *QueryMarketDepth) ProtoReflect() protoreflect.Message

func (*QueryMarketDepth) Reset

func (x *QueryMarketDepth) Reset()

func (*QueryMarketDepth) String

func (x *QueryMarketDepth) String() string

type QueryOrder

type QueryOrder struct {
	OrderID int64 `protobuf:"varint,1,opt,name=orderID,proto3" json:"orderID,omitempty"`
	// contains filtered or unexported fields
}

根据orderID去查询订单信息

func (*QueryOrder) Descriptor deprecated

func (*QueryOrder) Descriptor() ([]byte, []int)

Deprecated: Use QueryOrder.ProtoReflect.Descriptor instead.

func (*QueryOrder) GetOrderID

func (x *QueryOrder) GetOrderID() int64

func (*QueryOrder) ProtoMessage

func (*QueryOrder) ProtoMessage()

func (*QueryOrder) ProtoReflect added in v1.65.3

func (x *QueryOrder) ProtoReflect() protoreflect.Message

func (*QueryOrder) Reset

func (x *QueryOrder) Reset()

func (*QueryOrder) String

func (x *QueryOrder) String() string

type QueryOrderList

type QueryOrderList struct {

	//挂单状态必填(默认是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,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,proto3" json:"direction,omitempty"`
	// contains filtered or unexported fields
}

根据地址,状态查询用户自己的挂单信息

func (*QueryOrderList) Descriptor deprecated

func (*QueryOrderList) Descriptor() ([]byte, []int)

Deprecated: Use QueryOrderList.ProtoReflect.Descriptor instead.

func (*QueryOrderList) GetAddress

func (x *QueryOrderList) GetAddress() string

func (*QueryOrderList) GetCount

func (x *QueryOrderList) GetCount() int32

func (*QueryOrderList) GetDirection

func (x *QueryOrderList) GetDirection() int32

func (*QueryOrderList) GetPrimaryKey

func (x *QueryOrderList) GetPrimaryKey() string

func (*QueryOrderList) GetStatus

func (x *QueryOrderList) GetStatus() int32

func (*QueryOrderList) ProtoMessage

func (*QueryOrderList) ProtoMessage()

func (*QueryOrderList) ProtoReflect added in v1.65.3

func (x *QueryOrderList) ProtoReflect() protoreflect.Message

func (*QueryOrderList) Reset

func (x *QueryOrderList) Reset()

func (*QueryOrderList) String

func (x *QueryOrderList) String() string

type ReceiptExchange

type ReceiptExchange struct {
	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"`
	// contains filtered or unexported fields
}

exchange执行票据日志

func (*ReceiptExchange) Descriptor deprecated

func (*ReceiptExchange) Descriptor() ([]byte, []int)

Deprecated: Use ReceiptExchange.ProtoReflect.Descriptor instead.

func (*ReceiptExchange) GetIndex

func (x *ReceiptExchange) GetIndex() int64

func (*ReceiptExchange) GetMatchOrders

func (x *ReceiptExchange) GetMatchOrders() []*Order

func (*ReceiptExchange) GetOrder

func (x *ReceiptExchange) GetOrder() *Order

func (*ReceiptExchange) ProtoMessage

func (*ReceiptExchange) ProtoMessage()

func (*ReceiptExchange) ProtoReflect added in v1.65.3

func (x *ReceiptExchange) ProtoReflect() protoreflect.Message

func (*ReceiptExchange) Reset

func (x *ReceiptExchange) Reset()

func (*ReceiptExchange) String

func (x *ReceiptExchange) String() string

type RevokeOrder

type RevokeOrder struct {

	//订单号
	OrderID int64 `protobuf:"varint,1,opt,name=orderID,proto3" json:"orderID,omitempty"`
	// contains filtered or unexported fields
}

撤回订单

func (*RevokeOrder) Descriptor deprecated

func (*RevokeOrder) Descriptor() ([]byte, []int)

Deprecated: Use RevokeOrder.ProtoReflect.Descriptor instead.

func (*RevokeOrder) GetOrderID

func (x *RevokeOrder) GetOrderID() int64

func (*RevokeOrder) ProtoMessage

func (*RevokeOrder) ProtoMessage()

func (*RevokeOrder) ProtoReflect added in v1.65.3

func (x *RevokeOrder) ProtoReflect() protoreflect.Message

func (*RevokeOrder) Reset

func (x *RevokeOrder) Reset()

func (*RevokeOrder) String

func (x *RevokeOrder) String() string

type UnimplementedExchangeServer

type UnimplementedExchangeServer struct {
}

UnimplementedExchangeServer can be embedded to have forward compatible implementations.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL