Documentation ¶
Index ¶
- Variables
- func ErrorUnknownError(format string, args ...interface{}) *errors.Error
- func IsUnknownError(err error) bool
- func RegisterOrderServer(s grpc.ServiceRegistrar, srv OrderServer)
- type CreateOrderReply
- func (*CreateOrderReply) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOrderReply) GetId() int64
- func (x *CreateOrderReply) GetUserId() int64
- func (*CreateOrderReply) ProtoMessage()
- func (x *CreateOrderReply) ProtoReflect() protoreflect.Message
- func (x *CreateOrderReply) Reset()
- func (x *CreateOrderReply) String() string
- type CreateOrderReq
- type GetOrderReply
- func (*GetOrderReply) Descriptor() ([]byte, []int)deprecated
- func (x *GetOrderReply) GetId() int64
- func (x *GetOrderReply) GetUserId() int64
- func (*GetOrderReply) ProtoMessage()
- func (x *GetOrderReply) ProtoReflect() protoreflect.Message
- func (x *GetOrderReply) Reset()
- func (x *GetOrderReply) String() string
- type GetOrderReq
- type ListOrderReply
- type ListOrderReply_Order
- func (*ListOrderReply_Order) Descriptor() ([]byte, []int)deprecated
- func (x *ListOrderReply_Order) GetId() int64
- func (x *ListOrderReply_Order) GetUserId() int64
- func (*ListOrderReply_Order) ProtoMessage()
- func (x *ListOrderReply_Order) ProtoReflect() protoreflect.Message
- func (x *ListOrderReply_Order) Reset()
- func (x *ListOrderReply_Order) String() string
- type ListOrderReq
- func (*ListOrderReq) Descriptor() ([]byte, []int)deprecated
- func (x *ListOrderReq) GetPageNum() int64
- func (x *ListOrderReq) GetPageSize() int64
- func (x *ListOrderReq) GetUid() int64
- func (*ListOrderReq) ProtoMessage()
- func (x *ListOrderReq) ProtoReflect() protoreflect.Message
- func (x *ListOrderReq) Reset()
- func (x *ListOrderReq) String() string
- type OrderClient
- type OrderServer
- type OrderServiceErrorReason
- func (OrderServiceErrorReason) Descriptor() protoreflect.EnumDescriptor
- func (x OrderServiceErrorReason) Enum() *OrderServiceErrorReason
- func (OrderServiceErrorReason) EnumDescriptor() ([]byte, []int)deprecated
- func (x OrderServiceErrorReason) Number() protoreflect.EnumNumber
- func (x OrderServiceErrorReason) String() string
- func (OrderServiceErrorReason) Type() protoreflect.EnumType
- type UnimplementedOrderServer
- func (UnimplementedOrderServer) CreateOrder(context.Context, *CreateOrderReq) (*CreateOrderReply, error)
- func (UnimplementedOrderServer) GetOrder(context.Context, *GetOrderReq) (*GetOrderReply, error)
- func (UnimplementedOrderServer) ListOrder(context.Context, *ListOrderReq) (*ListOrderReply, error)
- func (UnimplementedOrderServer) UpdateOrder(context.Context, *UpdateOrderReq) (*UpdateOrderReply, error)
- type UnsafeOrderServer
- type UpdateOrderReply
- func (*UpdateOrderReply) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateOrderReply) GetId() int64
- func (x *UpdateOrderReply) GetUserId() int64
- func (*UpdateOrderReply) ProtoMessage()
- func (x *UpdateOrderReply) ProtoReflect() protoreflect.Message
- func (x *UpdateOrderReply) Reset()
- func (x *UpdateOrderReply) String() string
- type UpdateOrderReq
- func (*UpdateOrderReq) Descriptor() ([]byte, []int)deprecated
- func (x *UpdateOrderReq) GetId() int64
- func (x *UpdateOrderReq) GetUserId() int64
- func (*UpdateOrderReq) ProtoMessage()
- func (x *UpdateOrderReq) ProtoReflect() protoreflect.Message
- func (x *UpdateOrderReq) Reset()
- func (x *UpdateOrderReq) String() string
Constants ¶
This section is empty.
Variables ¶
var ( OrderServiceErrorReason_name = map[int32]string{ 0: "UNKNOWN_ERROR", } OrderServiceErrorReason_value = map[string]int32{ "UNKNOWN_ERROR": 0, } )
Enum value maps for OrderServiceErrorReason.
var File_v1_order_error_proto protoreflect.FileDescriptor
var File_v1_order_proto protoreflect.FileDescriptor
var Order_ServiceDesc = grpc.ServiceDesc{ ServiceName: "order.service.v1.Order", HandlerType: (*OrderServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "ListOrder", Handler: _Order_ListOrder_Handler, }, { MethodName: "CreateOrder", Handler: _Order_CreateOrder_Handler, }, { MethodName: "GetOrder", Handler: _Order_GetOrder_Handler, }, { MethodName: "UpdateOrder", Handler: _Order_UpdateOrder_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "v1/order.proto", }
Order_ServiceDesc is the grpc.ServiceDesc for Order service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func ErrorUnknownError ¶
func IsUnknownError ¶
func RegisterOrderServer ¶
func RegisterOrderServer(s grpc.ServiceRegistrar, srv OrderServer)
Types ¶
type CreateOrderReply ¶
type CreateOrderReply struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderReply) Descriptor
deprecated
func (*CreateOrderReply) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderReply.ProtoReflect.Descriptor instead.
func (*CreateOrderReply) GetId ¶
func (x *CreateOrderReply) GetId() int64
func (*CreateOrderReply) GetUserId ¶
func (x *CreateOrderReply) GetUserId() int64
func (*CreateOrderReply) ProtoMessage ¶
func (*CreateOrderReply) ProtoMessage()
func (*CreateOrderReply) ProtoReflect ¶
func (x *CreateOrderReply) ProtoReflect() protoreflect.Message
func (*CreateOrderReply) Reset ¶
func (x *CreateOrderReply) Reset()
func (*CreateOrderReply) String ¶
func (x *CreateOrderReply) String() string
type CreateOrderReq ¶
type CreateOrderReq struct { UserId int64 `protobuf:"varint,1,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderReq) Descriptor
deprecated
func (*CreateOrderReq) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderReq.ProtoReflect.Descriptor instead.
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 GetOrderReply ¶
type GetOrderReply struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*GetOrderReply) Descriptor
deprecated
func (*GetOrderReply) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderReply.ProtoReflect.Descriptor instead.
func (*GetOrderReply) GetId ¶
func (x *GetOrderReply) GetId() int64
func (*GetOrderReply) GetUserId ¶
func (x *GetOrderReply) GetUserId() int64
func (*GetOrderReply) ProtoMessage ¶
func (*GetOrderReply) ProtoMessage()
func (*GetOrderReply) ProtoReflect ¶
func (x *GetOrderReply) ProtoReflect() protoreflect.Message
func (*GetOrderReply) Reset ¶
func (x *GetOrderReply) Reset()
func (*GetOrderReply) String ¶
func (x *GetOrderReply) String() string
type GetOrderReq ¶
type GetOrderReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` // contains filtered or unexported fields }
func (*GetOrderReq) Descriptor
deprecated
func (*GetOrderReq) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderReq.ProtoReflect.Descriptor instead.
func (*GetOrderReq) GetId ¶
func (x *GetOrderReq) GetId() int64
func (*GetOrderReq) ProtoMessage ¶
func (*GetOrderReq) ProtoMessage()
func (*GetOrderReq) ProtoReflect ¶
func (x *GetOrderReq) ProtoReflect() protoreflect.Message
func (*GetOrderReq) Reset ¶
func (x *GetOrderReq) Reset()
func (*GetOrderReq) String ¶
func (x *GetOrderReq) String() string
type ListOrderReply ¶
type ListOrderReply struct { Orders []*ListOrderReply_Order `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` // contains filtered or unexported fields }
func (*ListOrderReply) Descriptor
deprecated
func (*ListOrderReply) Descriptor() ([]byte, []int)
Deprecated: Use ListOrderReply.ProtoReflect.Descriptor instead.
func (*ListOrderReply) GetOrders ¶
func (x *ListOrderReply) GetOrders() []*ListOrderReply_Order
func (*ListOrderReply) ProtoMessage ¶
func (*ListOrderReply) ProtoMessage()
func (*ListOrderReply) ProtoReflect ¶
func (x *ListOrderReply) ProtoReflect() protoreflect.Message
func (*ListOrderReply) Reset ¶
func (x *ListOrderReply) Reset()
func (*ListOrderReply) String ¶
func (x *ListOrderReply) String() string
type ListOrderReply_Order ¶
type ListOrderReply_Order struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*ListOrderReply_Order) Descriptor
deprecated
func (*ListOrderReply_Order) Descriptor() ([]byte, []int)
Deprecated: Use ListOrderReply_Order.ProtoReflect.Descriptor instead.
func (*ListOrderReply_Order) GetId ¶
func (x *ListOrderReply_Order) GetId() int64
func (*ListOrderReply_Order) GetUserId ¶
func (x *ListOrderReply_Order) GetUserId() int64
func (*ListOrderReply_Order) ProtoMessage ¶
func (*ListOrderReply_Order) ProtoMessage()
func (*ListOrderReply_Order) ProtoReflect ¶
func (x *ListOrderReply_Order) ProtoReflect() protoreflect.Message
func (*ListOrderReply_Order) Reset ¶
func (x *ListOrderReply_Order) Reset()
func (*ListOrderReply_Order) String ¶
func (x *ListOrderReply_Order) String() string
type ListOrderReq ¶
type ListOrderReq struct { Uid int64 `protobuf:"varint,1,opt,name=uid,proto3" json:"uid,omitempty"` PageNum int64 `protobuf:"varint,2,opt,name=page_num,json=pageNum,proto3" json:"page_num,omitempty"` PageSize int64 `protobuf:"varint,3,opt,name=page_size,json=pageSize,proto3" json:"page_size,omitempty"` // contains filtered or unexported fields }
func (*ListOrderReq) Descriptor
deprecated
func (*ListOrderReq) Descriptor() ([]byte, []int)
Deprecated: Use ListOrderReq.ProtoReflect.Descriptor instead.
func (*ListOrderReq) GetPageNum ¶
func (x *ListOrderReq) GetPageNum() int64
func (*ListOrderReq) GetPageSize ¶
func (x *ListOrderReq) GetPageSize() int64
func (*ListOrderReq) GetUid ¶
func (x *ListOrderReq) GetUid() int64
func (*ListOrderReq) ProtoMessage ¶
func (*ListOrderReq) ProtoMessage()
func (*ListOrderReq) ProtoReflect ¶
func (x *ListOrderReq) ProtoReflect() protoreflect.Message
func (*ListOrderReq) Reset ¶
func (x *ListOrderReq) Reset()
func (*ListOrderReq) String ¶
func (x *ListOrderReq) String() string
type OrderClient ¶
type OrderClient interface { ListOrder(ctx context.Context, in *ListOrderReq, opts ...grpc.CallOption) (*ListOrderReply, error) CreateOrder(ctx context.Context, in *CreateOrderReq, opts ...grpc.CallOption) (*CreateOrderReply, error) GetOrder(ctx context.Context, in *GetOrderReq, opts ...grpc.CallOption) (*GetOrderReply, error) UpdateOrder(ctx context.Context, in *UpdateOrderReq, opts ...grpc.CallOption) (*UpdateOrderReply, error) }
OrderClient is the client API for Order service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream.
func NewOrderClient ¶
func NewOrderClient(cc grpc.ClientConnInterface) OrderClient
type OrderServer ¶
type OrderServer interface { ListOrder(context.Context, *ListOrderReq) (*ListOrderReply, error) CreateOrder(context.Context, *CreateOrderReq) (*CreateOrderReply, error) GetOrder(context.Context, *GetOrderReq) (*GetOrderReply, error) UpdateOrder(context.Context, *UpdateOrderReq) (*UpdateOrderReply, error) // contains filtered or unexported methods }
OrderServer is the server API for Order service. All implementations must embed UnimplementedOrderServer for forward compatibility
type OrderServiceErrorReason ¶
type OrderServiceErrorReason int32
const (
OrderServiceErrorReason_UNKNOWN_ERROR OrderServiceErrorReason = 0
)
func (OrderServiceErrorReason) Descriptor ¶
func (OrderServiceErrorReason) Descriptor() protoreflect.EnumDescriptor
func (OrderServiceErrorReason) Enum ¶
func (x OrderServiceErrorReason) Enum() *OrderServiceErrorReason
func (OrderServiceErrorReason) EnumDescriptor
deprecated
func (OrderServiceErrorReason) EnumDescriptor() ([]byte, []int)
Deprecated: Use OrderServiceErrorReason.Descriptor instead.
func (OrderServiceErrorReason) Number ¶
func (x OrderServiceErrorReason) Number() protoreflect.EnumNumber
func (OrderServiceErrorReason) String ¶
func (x OrderServiceErrorReason) String() string
func (OrderServiceErrorReason) Type ¶
func (OrderServiceErrorReason) Type() protoreflect.EnumType
type UnimplementedOrderServer ¶
type UnimplementedOrderServer struct { }
UnimplementedOrderServer must be embedded to have forward compatible implementations.
func (UnimplementedOrderServer) CreateOrder ¶
func (UnimplementedOrderServer) CreateOrder(context.Context, *CreateOrderReq) (*CreateOrderReply, error)
func (UnimplementedOrderServer) GetOrder ¶
func (UnimplementedOrderServer) GetOrder(context.Context, *GetOrderReq) (*GetOrderReply, error)
func (UnimplementedOrderServer) ListOrder ¶
func (UnimplementedOrderServer) ListOrder(context.Context, *ListOrderReq) (*ListOrderReply, error)
func (UnimplementedOrderServer) UpdateOrder ¶
func (UnimplementedOrderServer) UpdateOrder(context.Context, *UpdateOrderReq) (*UpdateOrderReply, error)
type UnsafeOrderServer ¶
type UnsafeOrderServer interface {
// contains filtered or unexported methods
}
UnsafeOrderServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to OrderServer will result in compilation errors.
type UpdateOrderReply ¶
type UpdateOrderReply struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*UpdateOrderReply) Descriptor
deprecated
func (*UpdateOrderReply) Descriptor() ([]byte, []int)
Deprecated: Use UpdateOrderReply.ProtoReflect.Descriptor instead.
func (*UpdateOrderReply) GetId ¶
func (x *UpdateOrderReply) GetId() int64
func (*UpdateOrderReply) GetUserId ¶
func (x *UpdateOrderReply) GetUserId() int64
func (*UpdateOrderReply) ProtoMessage ¶
func (*UpdateOrderReply) ProtoMessage()
func (*UpdateOrderReply) ProtoReflect ¶
func (x *UpdateOrderReply) ProtoReflect() protoreflect.Message
func (*UpdateOrderReply) Reset ¶
func (x *UpdateOrderReply) Reset()
func (*UpdateOrderReply) String ¶
func (x *UpdateOrderReply) String() string
type UpdateOrderReq ¶
type UpdateOrderReq struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` UserId int64 `protobuf:"varint,2,opt,name=user_id,json=userId,proto3" json:"user_id,omitempty"` // contains filtered or unexported fields }
func (*UpdateOrderReq) Descriptor
deprecated
func (*UpdateOrderReq) Descriptor() ([]byte, []int)
Deprecated: Use UpdateOrderReq.ProtoReflect.Descriptor instead.
func (*UpdateOrderReq) GetId ¶
func (x *UpdateOrderReq) GetId() int64
func (*UpdateOrderReq) GetUserId ¶
func (x *UpdateOrderReq) GetUserId() int64
func (*UpdateOrderReq) ProtoMessage ¶
func (*UpdateOrderReq) ProtoMessage()
func (*UpdateOrderReq) ProtoReflect ¶
func (x *UpdateOrderReq) ProtoReflect() protoreflect.Message
func (*UpdateOrderReq) Reset ¶
func (x *UpdateOrderReq) Reset()
func (*UpdateOrderReq) String ¶
func (x *UpdateOrderReq) String() string