v1

package
v0.0.0-...-b12402e Latest Latest
Warning

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

Go to latest
Published: Jul 5, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	OrderServiceErrorReason_name = map[int32]string{
		0: "UNKNOWN_ERROR",
	}
	OrderServiceErrorReason_value = map[string]int32{
		"UNKNOWN_ERROR": 0,
	}
)

Enum value maps for OrderServiceErrorReason.

View Source
var File_v1_order_error_proto protoreflect.FileDescriptor
View Source
var File_v1_order_proto protoreflect.FileDescriptor
View Source
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 ErrorUnknownError(format string, args ...interface{}) *errors.Error

func IsUnknownError

func IsUnknownError(err error) bool

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) Enum

func (OrderServiceErrorReason) EnumDescriptor deprecated

func (OrderServiceErrorReason) EnumDescriptor() ([]byte, []int)

Deprecated: Use OrderServiceErrorReason.Descriptor instead.

func (OrderServiceErrorReason) Number

func (OrderServiceErrorReason) String

func (x OrderServiceErrorReason) String() string

func (OrderServiceErrorReason) Type

type UnimplementedOrderServer

type UnimplementedOrderServer struct {
}

UnimplementedOrderServer must be embedded to have forward compatible implementations.

func (UnimplementedOrderServer) CreateOrder

func (UnimplementedOrderServer) GetOrder

func (UnimplementedOrderServer) ListOrder

func (UnimplementedOrderServer) UpdateOrder

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

Jump to

Keyboard shortcuts

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