Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterOrderServiceServer(s grpc.ServiceRegistrar, srv OrderServiceServer)
- type CancelOrderReq
- func (*CancelOrderReq) Descriptor() ([]byte, []int)deprecated
- func (x *CancelOrderReq) GetId() int64
- func (x *CancelOrderReq) GetUid() int64
- func (*CancelOrderReq) ProtoMessage()
- func (x *CancelOrderReq) ProtoReflect() protoreflect.Message
- func (x *CancelOrderReq) Reset()
- func (x *CancelOrderReq) String() string
- type CreateOrderReq
- func (*CreateOrderReq) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOrderReq) GetAmount() string
- func (x *CreateOrderReq) GetOrderId() string
- func (x *CreateOrderReq) GetOrderType() enum.OrderType
- func (x *CreateOrderReq) GetPrice() string
- func (x *CreateOrderReq) GetQty() string
- func (x *CreateOrderReq) GetSide() enum.Side
- func (x *CreateOrderReq) GetSymbolId() int32
- func (x *CreateOrderReq) GetSymbolName() string
- func (x *CreateOrderReq) GetUserId() int64
- func (*CreateOrderReq) ProtoMessage()
- func (x *CreateOrderReq) ProtoReflect() protoreflect.Message
- func (x *CreateOrderReq) Reset()
- func (x *CreateOrderReq) String() string
- type FreezeUserAssetResp
- type GetOrderAllPendingOrderResp
- func (*GetOrderAllPendingOrderResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetOrderAllPendingOrderResp) GetAmount() string
- func (x *GetOrderAllPendingOrderResp) GetDone() bool
- func (x *GetOrderAllPendingOrderResp) GetOrderId() string
- func (x *GetOrderAllPendingOrderResp) GetOrderType() enum.OrderType
- func (x *GetOrderAllPendingOrderResp) GetPrice() string
- func (x *GetOrderAllPendingOrderResp) GetQty() string
- func (x *GetOrderAllPendingOrderResp) GetSequenceId() int64
- func (x *GetOrderAllPendingOrderResp) GetSide() enum.Side
- func (x *GetOrderAllPendingOrderResp) GetUid() int64
- func (x *GetOrderAllPendingOrderResp) GetUnFilledAmount() string
- func (x *GetOrderAllPendingOrderResp) GetUnFilledQty() string
- func (*GetOrderAllPendingOrderResp) ProtoMessage()
- func (x *GetOrderAllPendingOrderResp) ProtoReflect() protoreflect.Message
- func (x *GetOrderAllPendingOrderResp) Reset()
- func (x *GetOrderAllPendingOrderResp) String() string
- type GetOrderListByUserReq
- func (*GetOrderListByUserReq) Descriptor() ([]byte, []int)deprecated
- func (x *GetOrderListByUserReq) GetId() int64
- func (x *GetOrderListByUserReq) GetPageSize() int64
- func (x *GetOrderListByUserReq) GetStatusList() []enum.OrderStatus
- func (x *GetOrderListByUserReq) GetUserId() int64
- func (*GetOrderListByUserReq) ProtoMessage()
- func (x *GetOrderListByUserReq) ProtoReflect() protoreflect.Message
- func (x *GetOrderListByUserReq) Reset()
- func (x *GetOrderListByUserReq) String() string
- type GetOrderListByUserResp
- func (*GetOrderListByUserResp) Descriptor() ([]byte, []int)deprecated
- func (x *GetOrderListByUserResp) GetOrderList() []*Order
- func (x *GetOrderListByUserResp) GetTotal() int64
- func (*GetOrderListByUserResp) ProtoMessage()
- func (x *GetOrderListByUserResp) ProtoReflect() protoreflect.Message
- func (x *GetOrderListByUserResp) Reset()
- func (x *GetOrderListByUserResp) String() string
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetAmount() string
- func (x *Order) GetCreatedAt() int64
- func (x *Order) GetFilledAmount() string
- func (x *Order) GetFilledAvgPrice() string
- func (x *Order) GetFilledQty() string
- func (x *Order) GetId() int64
- func (x *Order) GetOrderId() string
- func (x *Order) GetOrderType() enum.OrderType
- func (x *Order) GetPrice() string
- func (x *Order) GetQty() string
- func (x *Order) GetSide() enum.Side
- func (x *Order) GetStatus() enum.OrderStatus
- func (x *Order) GetSymbolId() int32
- func (x *Order) GetSymbolName() string
- func (x *Order) GetUpdatedAt() int64
- func (x *Order) GetUserId() int64
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type OrderEmpty
- type OrderServiceClient
- type OrderServiceServer
- type OrderService_GetOrderAllPendingOrderClient
- type OrderService_GetOrderAllPendingOrderServer
- type UnimplementedOrderServiceServer
- func (UnimplementedOrderServiceServer) CancelOrder(context.Context, *CancelOrderReq) (*OrderEmpty, error)
- func (UnimplementedOrderServiceServer) CreateOrder(context.Context, *CreateOrderReq) (*OrderEmpty, error)
- func (UnimplementedOrderServiceServer) CreateOrderRevert(context.Context, *CreateOrderReq) (*OrderEmpty, error)
- func (UnimplementedOrderServiceServer) GetOrderAllPendingOrder(*OrderEmpty, OrderService_GetOrderAllPendingOrderServer) error
- func (UnimplementedOrderServiceServer) GetOrderList(context.Context, *GetOrderListByUserReq) (*GetOrderListByUserResp, error)
- func (UnimplementedOrderServiceServer) Order(context.Context, *CreateOrderReq) (*OrderEmpty, error)
- type UnsafeOrderServiceServer
- type UpdateEntrustOrderReq
- func (*UpdateEntrustOrderReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateEntrustOrderReq) GetFilledAmount() string
- func (x *UpdateEntrustOrderReq) GetFilledQty() string
- func (x *UpdateEntrustOrderReq) GetOrderId() string
- func (x *UpdateEntrustOrderReq) GetUnFilledAmount() string
- func (x *UpdateEntrustOrderReq) GetUnFilledQty() string
- func (*UpdateEntrustOrderReq) ProtoMessage()
- func (x *UpdateEntrustOrderReq) ProtoReflect() protoreflect.Message
- func (x *UpdateEntrustOrderReq) Reset()
- func (x *UpdateEntrustOrderReq) String() string
- type UpdateOrderStatusReq
- func (*UpdateOrderStatusReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateOrderStatusReq) GetOrderId() string
- func (x *UpdateOrderStatusReq) GetOrderStatus() enum.OrderStatus
- func (*UpdateOrderStatusReq) ProtoMessage()
- func (x *UpdateOrderStatusReq) ProtoReflect() protoreflect.Message
- func (x *UpdateOrderStatusReq) Reset()
- func (x *UpdateOrderStatusReq) String() string
Constants ¶
const ( OrderService_Order_FullMethodName = "/order.OrderService/Order" OrderService_CreateOrder_FullMethodName = "/order.OrderService/CreateOrder" OrderService_GetOrderList_FullMethodName = "/order.OrderService/GetOrderList" OrderService_CancelOrder_FullMethodName = "/order.OrderService/CancelOrder" OrderService_CreateOrderRevert_FullMethodName = "/order.OrderService/CreateOrderRevert" OrderService_GetOrderAllPendingOrder_FullMethodName = "/order.OrderService/GetOrderAllPendingOrder" )
Variables ¶
var File_app_order_rpc_pb_order_proto protoreflect.FileDescriptor
var OrderService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "order.OrderService", HandlerType: (*OrderServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Order", Handler: _OrderService_Order_Handler, }, { MethodName: "CreateOrder", Handler: _OrderService_CreateOrder_Handler, }, { MethodName: "GetOrderList", Handler: _OrderService_GetOrderList_Handler, }, { MethodName: "CancelOrder", Handler: _OrderService_CancelOrder_Handler, }, { MethodName: "CreateOrderRevert", Handler: _OrderService_CreateOrderRevert_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetOrderAllPendingOrder", Handler: _OrderService_GetOrderAllPendingOrder_Handler, ServerStreams: true, }, }, Metadata: "app/order/rpc/pb/order.proto", }
OrderService_ServiceDesc is the grpc.ServiceDesc for OrderService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterOrderServiceServer ¶
func RegisterOrderServiceServer(s grpc.ServiceRegistrar, srv OrderServiceServer)
Types ¶
type CancelOrderReq ¶
type CancelOrderReq struct { // 订单id Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 用户id Uid int64 `protobuf:"varint,2,opt,name=uid,proto3" json:"uid,omitempty"` // contains filtered or unexported fields }
func (*CancelOrderReq) Descriptor
deprecated
func (*CancelOrderReq) Descriptor() ([]byte, []int)
Deprecated: Use CancelOrderReq.ProtoReflect.Descriptor instead.
func (*CancelOrderReq) GetId ¶
func (x *CancelOrderReq) GetId() int64
func (*CancelOrderReq) GetUid ¶
func (x *CancelOrderReq) GetUid() int64
func (*CancelOrderReq) ProtoMessage ¶
func (*CancelOrderReq) ProtoMessage()
func (*CancelOrderReq) ProtoReflect ¶
func (x *CancelOrderReq) ProtoReflect() protoreflect.Message
func (*CancelOrderReq) Reset ¶
func (x *CancelOrderReq) Reset()
func (*CancelOrderReq) String ¶
func (x *CancelOrderReq) String() string
type CreateOrderReq ¶
type CreateOrderReq struct { // 用户ID UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 交易对ID SymbolId int32 `protobuf:"varint,4,opt,name=symbol_id,json=symbolId,proto3" json:"symbol_id,omitempty"` // 交易对名称 SymbolName string `protobuf:"bytes,5,opt,name=symbol_name,json=symbolName,proto3" json:"symbol_name,omitempty"` // 下单数量 Qty string `protobuf:"bytes,6,opt,name=qty,proto3" json:"qty,omitempty"` // 价格 Price string `protobuf:"bytes,7,opt,name=price,proto3" json:"price,omitempty"` // 金额 Amount string `protobuf:"bytes,13,opt,name=amount,proto3" json:"amount,omitempty"` // 方向 - 1: 买, 2: 卖 Side enum.Side `protobuf:"varint,8,opt,name=side,proto3,enum=commonEnum.Side" json:"side,omitempty"` // 订单类型 - 1: 市价单, 2: 限价单 OrderType enum.OrderType `protobuf:"varint,10,opt,name=order_type,json=orderType,proto3,enum=commonEnum.OrderType" json:"order_type,omitempty"` // 订单id用于补偿定位订单 OrderId string `protobuf:"bytes,14,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` // contains filtered or unexported fields }
下单请求
func (*CreateOrderReq) Descriptor
deprecated
func (*CreateOrderReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderReq.ProtoReflect.Descriptor instead.
func (*CreateOrderReq) GetAmount ¶
func (x *CreateOrderReq) GetAmount() string
func (*CreateOrderReq) GetOrderId ¶
func (x *CreateOrderReq) GetOrderId() string
func (*CreateOrderReq) GetOrderType ¶
func (x *CreateOrderReq) GetOrderType() enum.OrderType
func (*CreateOrderReq) GetPrice ¶
func (x *CreateOrderReq) GetPrice() string
func (*CreateOrderReq) GetQty ¶
func (x *CreateOrderReq) GetQty() string
func (*CreateOrderReq) GetSide ¶
func (x *CreateOrderReq) GetSide() enum.Side
func (*CreateOrderReq) GetSymbolId ¶
func (x *CreateOrderReq) GetSymbolId() int32
func (*CreateOrderReq) GetSymbolName ¶
func (x *CreateOrderReq) GetSymbolName() string
func (*CreateOrderReq) GetUserId ¶
func (x *CreateOrderReq) GetUserId() int64
func (*CreateOrderReq) ProtoMessage ¶
func (*CreateOrderReq) ProtoMessage()
func (*CreateOrderReq) ProtoReflect ¶
func (x *CreateOrderReq) ProtoReflect() protoreflect.Message
func (*CreateOrderReq) Reset ¶
func (x *CreateOrderReq) Reset()
func (*CreateOrderReq) String ¶
func (x *CreateOrderReq) String() string
type FreezeUserAssetResp ¶
type FreezeUserAssetResp struct {
// contains filtered or unexported fields
}
func (*FreezeUserAssetResp) Descriptor
deprecated
func (*FreezeUserAssetResp) Descriptor() ([]byte, []int)
Deprecated: Use FreezeUserAssetResp.ProtoReflect.Descriptor instead.
func (*FreezeUserAssetResp) ProtoMessage ¶
func (*FreezeUserAssetResp) ProtoMessage()
func (*FreezeUserAssetResp) ProtoReflect ¶
func (x *FreezeUserAssetResp) ProtoReflect() protoreflect.Message
func (*FreezeUserAssetResp) Reset ¶
func (x *FreezeUserAssetResp) Reset()
func (*FreezeUserAssetResp) String ¶
func (x *FreezeUserAssetResp) String() string
type GetOrderAllPendingOrderResp ¶
type GetOrderAllPendingOrderResp struct { // 订单id OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` // 订单序号,唯一在订单簿中如果价格相同,用这个来排序。 SequenceId int64 `protobuf:"varint,2,opt,name=sequence_id,json=sequenceId,proto3" json:"sequence_id,omitempty"` // 用户id Uid int64 `protobuf:"varint,9,opt,name=uid,proto3" json:"uid,omitempty"` // 订单方向 Side enum.Side `protobuf:"varint,3,opt,name=side,proto3,enum=commonEnum.Side" json:"side,omitempty"` // 价格 Price string `protobuf:"bytes,7,opt,name=price,proto3" json:"price,omitempty"` // 订单数量 Qty string `protobuf:"bytes,4,opt,name=qty,proto3" json:"qty,omitempty"` // 订单金额 计价币数量 Amount string `protobuf:"bytes,5,opt,name=amount,proto3" json:"amount,omitempty"` // 订单类型 OrderType enum.OrderType `protobuf:"varint,6,opt,name=order_type,json=orderType,proto3,enum=commonEnum.OrderType" json:"order_type,omitempty"` // 未成交金额 UnFilledAmount string `protobuf:"bytes,8,opt,name=un_filled_amount,json=unFilledAmount,proto3" json:"un_filled_amount,omitempty"` // 未成交数量 UnFilledQty string `protobuf:"bytes,10,opt,name=un_filled_qty,json=unFilledQty,proto3" json:"un_filled_qty,omitempty"` // 是否结束 Done bool `protobuf:"varint,11,opt,name=done,proto3" json:"done,omitempty"` // contains filtered or unexported fields }
func (*GetOrderAllPendingOrderResp) Descriptor
deprecated
func (*GetOrderAllPendingOrderResp) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderAllPendingOrderResp.ProtoReflect.Descriptor instead.
func (*GetOrderAllPendingOrderResp) GetAmount ¶
func (x *GetOrderAllPendingOrderResp) GetAmount() string
func (*GetOrderAllPendingOrderResp) GetDone ¶
func (x *GetOrderAllPendingOrderResp) GetDone() bool
func (*GetOrderAllPendingOrderResp) GetOrderId ¶
func (x *GetOrderAllPendingOrderResp) GetOrderId() string
func (*GetOrderAllPendingOrderResp) GetOrderType ¶
func (x *GetOrderAllPendingOrderResp) GetOrderType() enum.OrderType
func (*GetOrderAllPendingOrderResp) GetPrice ¶
func (x *GetOrderAllPendingOrderResp) GetPrice() string
func (*GetOrderAllPendingOrderResp) GetQty ¶
func (x *GetOrderAllPendingOrderResp) GetQty() string
func (*GetOrderAllPendingOrderResp) GetSequenceId ¶
func (x *GetOrderAllPendingOrderResp) GetSequenceId() int64
func (*GetOrderAllPendingOrderResp) GetSide ¶
func (x *GetOrderAllPendingOrderResp) GetSide() enum.Side
func (*GetOrderAllPendingOrderResp) GetUid ¶
func (x *GetOrderAllPendingOrderResp) GetUid() int64
func (*GetOrderAllPendingOrderResp) GetUnFilledAmount ¶
func (x *GetOrderAllPendingOrderResp) GetUnFilledAmount() string
func (*GetOrderAllPendingOrderResp) GetUnFilledQty ¶
func (x *GetOrderAllPendingOrderResp) GetUnFilledQty() string
func (*GetOrderAllPendingOrderResp) ProtoMessage ¶
func (*GetOrderAllPendingOrderResp) ProtoMessage()
func (*GetOrderAllPendingOrderResp) ProtoReflect ¶
func (x *GetOrderAllPendingOrderResp) ProtoReflect() protoreflect.Message
func (*GetOrderAllPendingOrderResp) Reset ¶
func (x *GetOrderAllPendingOrderResp) Reset()
func (*GetOrderAllPendingOrderResp) String ¶
func (x *GetOrderAllPendingOrderResp) String() string
type GetOrderListByUserReq ¶
type GetOrderListByUserReq struct { // 用户id UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 订单类型 StatusList []enum.OrderStatus `` /* 127-byte string literal not displayed */ // 分页数据主键ID Id int64 `protobuf:"varint,3,opt,name=id,proto3" json:"id,omitempty"` // 分页数据偏移量 PageSize int64 `protobuf:"varint,4,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // contains filtered or unexported fields }
func (*GetOrderListByUserReq) Descriptor
deprecated
func (*GetOrderListByUserReq) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderListByUserReq.ProtoReflect.Descriptor instead.
func (*GetOrderListByUserReq) GetId ¶
func (x *GetOrderListByUserReq) GetId() int64
func (*GetOrderListByUserReq) GetPageSize ¶
func (x *GetOrderListByUserReq) GetPageSize() int64
func (*GetOrderListByUserReq) GetStatusList ¶
func (x *GetOrderListByUserReq) GetStatusList() []enum.OrderStatus
func (*GetOrderListByUserReq) GetUserId ¶
func (x *GetOrderListByUserReq) GetUserId() int64
func (*GetOrderListByUserReq) ProtoMessage ¶
func (*GetOrderListByUserReq) ProtoMessage()
func (*GetOrderListByUserReq) ProtoReflect ¶
func (x *GetOrderListByUserReq) ProtoReflect() protoreflect.Message
func (*GetOrderListByUserReq) Reset ¶
func (x *GetOrderListByUserReq) Reset()
func (*GetOrderListByUserReq) String ¶
func (x *GetOrderListByUserReq) String() string
type GetOrderListByUserResp ¶
type GetOrderListByUserResp struct { OrderList []*Order `protobuf:"bytes,1,rep,name=order_list,json=orderList,proto3" json:"order_list,omitempty"` Total int64 `protobuf:"varint,2,opt,name=total,proto3" json:"total,omitempty"` // contains filtered or unexported fields }
func (*GetOrderListByUserResp) Descriptor
deprecated
func (*GetOrderListByUserResp) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderListByUserResp.ProtoReflect.Descriptor instead.
func (*GetOrderListByUserResp) GetOrderList ¶
func (x *GetOrderListByUserResp) GetOrderList() []*Order
func (*GetOrderListByUserResp) GetTotal ¶
func (x *GetOrderListByUserResp) GetTotal() int64
func (*GetOrderListByUserResp) ProtoMessage ¶
func (*GetOrderListByUserResp) ProtoMessage()
func (*GetOrderListByUserResp) ProtoReflect ¶
func (x *GetOrderListByUserResp) ProtoReflect() protoreflect.Message
func (*GetOrderListByUserResp) Reset ¶
func (x *GetOrderListByUserResp) Reset()
func (*GetOrderListByUserResp) String ¶
func (x *GetOrderListByUserResp) String() string
type Order ¶
type Order struct { // 自增ID Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // 订单id OrderId string `protobuf:"bytes,2,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` // 用户ID UserId int64 `protobuf:"varint,3,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // 交易对ID SymbolId int32 `protobuf:"varint,4,opt,name=symbol_id,json=symbolId,proto3" json:"symbol_id,omitempty"` // 交易对名称 SymbolName string `protobuf:"bytes,5,opt,name=symbol_name,json=symbolName,proto3" json:"symbol_name,omitempty"` // 下单数量 Qty string `protobuf:"bytes,6,opt,name=qty,proto3" json:"qty,omitempty"` // 价格 Price string `protobuf:"bytes,7,opt,name=price,proto3" json:"price,omitempty"` // 金额 Amount string `protobuf:"bytes,17,opt,name=amount,proto3" json:"amount,omitempty"` // 方向 - 1: 买, 2: 卖 Side enum.Side `protobuf:"varint,8,opt,name=side,proto3,enum=commonEnum.Side" json:"side,omitempty"` // 状态 - 1: 新订单, 2: 部分成交, 3: 全部成交, 4: 撤销 Status enum.OrderStatus `protobuf:"varint,9,opt,name=status,proto3,enum=commonEnum.OrderStatus" json:"status,omitempty"` // 订单类型 - 1: 市价单, 2: 限价单 OrderType enum.OrderType `protobuf:"varint,10,opt,name=order_type,json=orderType,proto3,enum=commonEnum.OrderType" json:"order_type,omitempty"` // 成交数量 FilledQty string `protobuf:"bytes,14,opt,name=filled_qty,json=filledQty,proto3" json:"filled_qty,omitempty"` // 成交金额 FilledAmount string `protobuf:"bytes,15,opt,name=filled_amount,json=filledAmount,proto3" json:"filled_amount,omitempty"` // 成交均价 FilledAvgPrice string `protobuf:"bytes,11,opt,name=filled_avg_price,json=filledAvgPrice,proto3" json:"filled_avg_price,omitempty"` // 创建时间 CreatedAt int64 `protobuf:"varint,12,opt,name=created_at,json=createdAt,proto3" json:"created_at,omitempty"` // 修改时间 UpdatedAt int64 `protobuf:"varint,13,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` // contains filtered or unexported fields }
订单实体
func (*Order) Descriptor
deprecated
func (*Order) GetCreatedAt ¶
func (*Order) GetFilledAmount ¶
func (*Order) GetFilledAvgPrice ¶
func (*Order) GetFilledQty ¶
func (*Order) GetOrderId ¶
func (*Order) GetOrderType ¶
func (*Order) GetStatus ¶
func (x *Order) GetStatus() enum.OrderStatus
func (*Order) GetSymbolId ¶
func (*Order) GetSymbolName ¶
func (*Order) GetUpdatedAt ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type OrderEmpty ¶
type OrderEmpty struct {
// contains filtered or unexported fields
}
func (*OrderEmpty) Descriptor
deprecated
func (*OrderEmpty) Descriptor() ([]byte, []int)
Deprecated: Use OrderEmpty.ProtoReflect.Descriptor instead.
func (*OrderEmpty) ProtoMessage ¶
func (*OrderEmpty) ProtoMessage()
func (*OrderEmpty) ProtoReflect ¶
func (x *OrderEmpty) ProtoReflect() protoreflect.Message
func (*OrderEmpty) Reset ¶
func (x *OrderEmpty) Reset()
func (*OrderEmpty) String ¶
func (x *OrderEmpty) String() string
type OrderServiceClient ¶
type OrderServiceClient interface { // 下单 Order(ctx context.Context, in *CreateOrderReq, opts ...grpc.CallOption) (*OrderEmpty, error) // 创建订单,下单有分布式事务要处理分为两个接口 CreateOrder(ctx context.Context, in *CreateOrderReq, opts ...grpc.CallOption) (*OrderEmpty, error) // 获取用户订单列表 GetOrderList(ctx context.Context, in *GetOrderListByUserReq, opts ...grpc.CallOption) (*GetOrderListByUserResp, error) // 取消订单 CancelOrder(ctx context.Context, in *CancelOrderReq, opts ...grpc.CallOption) (*OrderEmpty, error) // 下单补偿 CreateOrderRevert(ctx context.Context, in *CreateOrderReq, opts ...grpc.CallOption) (*OrderEmpty, error) // 获取所有订单状态为未成交或部分成交的订单 GetOrderAllPendingOrder(ctx context.Context, in *OrderEmpty, opts ...grpc.CallOption) (OrderService_GetOrderAllPendingOrderClient, error) }
OrderServiceClient is the client API for OrderService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkgo.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewOrderServiceClient ¶
func NewOrderServiceClient(cc grpc.ClientConnInterface) OrderServiceClient
type OrderServiceServer ¶
type OrderServiceServer interface { // 下单 Order(context.Context, *CreateOrderReq) (*OrderEmpty, error) // 创建订单,下单有分布式事务要处理分为两个接口 CreateOrder(context.Context, *CreateOrderReq) (*OrderEmpty, error) // 获取用户订单列表 GetOrderList(context.Context, *GetOrderListByUserReq) (*GetOrderListByUserResp, error) // 取消订单 CancelOrder(context.Context, *CancelOrderReq) (*OrderEmpty, error) // 下单补偿 CreateOrderRevert(context.Context, *CreateOrderReq) (*OrderEmpty, error) // 获取所有订单状态为未成交或部分成交的订单 GetOrderAllPendingOrder(*OrderEmpty, OrderService_GetOrderAllPendingOrderServer) error // contains filtered or unexported methods }
OrderServiceServer is the server API for OrderService service. All implementations must embed UnimplementedOrderServiceServer for forward compatibility
type OrderService_GetOrderAllPendingOrderClient ¶
type OrderService_GetOrderAllPendingOrderClient interface { Recv() (*GetOrderAllPendingOrderResp, error) grpc.ClientStream }
type OrderService_GetOrderAllPendingOrderServer ¶
type OrderService_GetOrderAllPendingOrderServer interface { Send(*GetOrderAllPendingOrderResp) error grpc.ServerStream }
type UnimplementedOrderServiceServer ¶
type UnimplementedOrderServiceServer struct { }
UnimplementedOrderServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedOrderServiceServer) CancelOrder ¶
func (UnimplementedOrderServiceServer) CancelOrder(context.Context, *CancelOrderReq) (*OrderEmpty, error)
func (UnimplementedOrderServiceServer) CreateOrder ¶
func (UnimplementedOrderServiceServer) CreateOrder(context.Context, *CreateOrderReq) (*OrderEmpty, error)
func (UnimplementedOrderServiceServer) CreateOrderRevert ¶
func (UnimplementedOrderServiceServer) CreateOrderRevert(context.Context, *CreateOrderReq) (*OrderEmpty, error)
func (UnimplementedOrderServiceServer) GetOrderAllPendingOrder ¶
func (UnimplementedOrderServiceServer) GetOrderAllPendingOrder(*OrderEmpty, OrderService_GetOrderAllPendingOrderServer) error
func (UnimplementedOrderServiceServer) GetOrderList ¶
func (UnimplementedOrderServiceServer) GetOrderList(context.Context, *GetOrderListByUserReq) (*GetOrderListByUserResp, error)
func (UnimplementedOrderServiceServer) Order ¶
func (UnimplementedOrderServiceServer) Order(context.Context, *CreateOrderReq) (*OrderEmpty, error)
type UnsafeOrderServiceServer ¶
type UnsafeOrderServiceServer interface {
// contains filtered or unexported methods
}
UnsafeOrderServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OrderServiceServer will result in compilation errors.
type UpdateEntrustOrderReq ¶
type UpdateEntrustOrderReq struct { // 订单id OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` // 成交数量 FilledQty string `protobuf:"bytes,3,opt,name=filled_qty,json=filledQty,proto3" json:"filled_qty,omitempty"` // 未成交数量 UnFilledQty string `protobuf:"bytes,4,opt,name=un_filled_qty,json=unFilledQty,proto3" json:"un_filled_qty,omitempty"` // 成交金额 FilledAmount string `protobuf:"bytes,5,opt,name=filled_amount,json=filledAmount,proto3" json:"filled_amount,omitempty"` // 未成交金额 UnFilledAmount string `protobuf:"bytes,6,opt,name=un_filled_amount,json=unFilledAmount,proto3" json:"un_filled_amount,omitempty"` // contains filtered or unexported fields }
func (*UpdateEntrustOrderReq) Descriptor
deprecated
func (*UpdateEntrustOrderReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateEntrustOrderReq.ProtoReflect.Descriptor instead.
func (*UpdateEntrustOrderReq) GetFilledAmount ¶
func (x *UpdateEntrustOrderReq) GetFilledAmount() string
func (*UpdateEntrustOrderReq) GetFilledQty ¶
func (x *UpdateEntrustOrderReq) GetFilledQty() string
func (*UpdateEntrustOrderReq) GetOrderId ¶
func (x *UpdateEntrustOrderReq) GetOrderId() string
func (*UpdateEntrustOrderReq) GetUnFilledAmount ¶
func (x *UpdateEntrustOrderReq) GetUnFilledAmount() string
func (*UpdateEntrustOrderReq) GetUnFilledQty ¶
func (x *UpdateEntrustOrderReq) GetUnFilledQty() string
func (*UpdateEntrustOrderReq) ProtoMessage ¶
func (*UpdateEntrustOrderReq) ProtoMessage()
func (*UpdateEntrustOrderReq) ProtoReflect ¶
func (x *UpdateEntrustOrderReq) ProtoReflect() protoreflect.Message
func (*UpdateEntrustOrderReq) Reset ¶
func (x *UpdateEntrustOrderReq) Reset()
func (*UpdateEntrustOrderReq) String ¶
func (x *UpdateEntrustOrderReq) String() string
type UpdateOrderStatusReq ¶
type UpdateOrderStatusReq struct { // 订单id OrderId string `protobuf:"bytes,1,opt,name=order_id,json=orderId,proto3" json:"order_id,omitempty"` // 订单状态 OrderStatus enum.OrderStatus `protobuf:"varint,2,opt,name=order_status,json=orderStatus,proto3,enum=commonEnum.OrderStatus" json:"order_status,omitempty"` // contains filtered or unexported fields }
func (*UpdateOrderStatusReq) Descriptor
deprecated
func (*UpdateOrderStatusReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateOrderStatusReq.ProtoReflect.Descriptor instead.
func (*UpdateOrderStatusReq) GetOrderId ¶
func (x *UpdateOrderStatusReq) GetOrderId() string
func (*UpdateOrderStatusReq) GetOrderStatus ¶
func (x *UpdateOrderStatusReq) GetOrderStatus() enum.OrderStatus
func (*UpdateOrderStatusReq) ProtoMessage ¶
func (*UpdateOrderStatusReq) ProtoMessage()
func (*UpdateOrderStatusReq) ProtoReflect ¶
func (x *UpdateOrderStatusReq) ProtoReflect() protoreflect.Message
func (*UpdateOrderStatusReq) Reset ¶
func (x *UpdateOrderStatusReq) Reset()
func (*UpdateOrderStatusReq) String ¶
func (x *UpdateOrderStatusReq) String() string