Documentation ¶
Index ¶
- Variables
- func RegisterOrderServiceServer(s grpc.ServiceRegistrar, srv OrderServiceServer)
- type CreateOrderRequest
- func (*CreateOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOrderRequest) GetCustomerId() string
- func (x *CreateOrderRequest) GetId() string
- func (x *CreateOrderRequest) GetProductId() string
- func (x *CreateOrderRequest) GetQuantity() int32
- func (*CreateOrderRequest) ProtoMessage()
- func (x *CreateOrderRequest) ProtoReflect() protoreflect.Message
- func (x *CreateOrderRequest) Reset()
- func (x *CreateOrderRequest) String() string
- type CreateOrderResponse
- func (*CreateOrderResponse) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOrderResponse) GetId() string
- func (x *CreateOrderResponse) GetStatus() bool
- func (*CreateOrderResponse) ProtoMessage()
- func (x *CreateOrderResponse) ProtoReflect() protoreflect.Message
- func (x *CreateOrderResponse) Reset()
- func (x *CreateOrderResponse) String() string
- type GetOrderFilter
- type GetOrderResponse
- type GetOrdersRequest
- func (*GetOrdersRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetOrdersRequest) GetCount() int32
- func (x *GetOrdersRequest) GetCustomerId() string
- func (x *GetOrdersRequest) GetStart() int32
- func (*GetOrdersRequest) ProtoMessage()
- func (x *GetOrdersRequest) ProtoReflect() protoreflect.Message
- func (x *GetOrdersRequest) Reset()
- func (x *GetOrdersRequest) String() string
- type Order
- func (*Order) Descriptor() ([]byte, []int)deprecated
- func (x *Order) GetCustomerId() string
- func (x *Order) GetId() string
- func (x *Order) GetProductId() string
- func (x *Order) GetQuantity() int32
- func (*Order) ProtoMessage()
- func (x *Order) ProtoReflect() protoreflect.Message
- func (x *Order) Reset()
- func (x *Order) String() string
- type OrderServiceClient
- type OrderServiceServer
- type OrderService_GetOrdersClient
- type OrderService_GetOrdersServer
- type UnimplementedOrderServiceServer
- func (UnimplementedOrderServiceServer) CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error)
- func (UnimplementedOrderServiceServer) GetOrder(context.Context, *GetOrderFilter) (*GetOrderResponse, error)
- func (UnimplementedOrderServiceServer) GetOrders(*GetOrdersRequest, OrderService_GetOrdersServer) error
- type UnsafeOrderServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_orders_proto protoreflect.FileDescriptor
var OrderService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "OrderService", HandlerType: (*OrderServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateOrder", Handler: _OrderService_CreateOrder_Handler, }, { MethodName: "GetOrder", Handler: _OrderService_GetOrder_Handler, }, }, Streams: []grpc.StreamDesc{ { StreamName: "GetOrders", Handler: _OrderService_GetOrders_Handler, ServerStreams: true, }, }, Metadata: "orders.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 CreateOrderRequest ¶
type CreateOrderRequest struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` ProductId string `protobuf:"bytes,3,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` Quantity int32 `protobuf:"varint,4,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderRequest) Descriptor
deprecated
func (*CreateOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderRequest.ProtoReflect.Descriptor instead.
func (*CreateOrderRequest) GetCustomerId ¶
func (x *CreateOrderRequest) GetCustomerId() string
func (*CreateOrderRequest) GetId ¶
func (x *CreateOrderRequest) GetId() string
func (*CreateOrderRequest) GetProductId ¶
func (x *CreateOrderRequest) GetProductId() string
func (*CreateOrderRequest) GetQuantity ¶
func (x *CreateOrderRequest) GetQuantity() int32
func (*CreateOrderRequest) ProtoMessage ¶
func (*CreateOrderRequest) ProtoMessage()
func (*CreateOrderRequest) ProtoReflect ¶
func (x *CreateOrderRequest) ProtoReflect() protoreflect.Message
func (*CreateOrderRequest) Reset ¶
func (x *CreateOrderRequest) Reset()
func (*CreateOrderRequest) String ¶
func (x *CreateOrderRequest) String() string
type CreateOrderResponse ¶
type CreateOrderResponse struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Status bool `protobuf:"varint,2,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderResponse) Descriptor
deprecated
func (*CreateOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderResponse.ProtoReflect.Descriptor instead.
func (*CreateOrderResponse) GetId ¶
func (x *CreateOrderResponse) GetId() string
func (*CreateOrderResponse) GetStatus ¶
func (x *CreateOrderResponse) GetStatus() bool
func (*CreateOrderResponse) ProtoMessage ¶
func (*CreateOrderResponse) ProtoMessage()
func (*CreateOrderResponse) ProtoReflect ¶
func (x *CreateOrderResponse) ProtoReflect() protoreflect.Message
func (*CreateOrderResponse) Reset ¶
func (x *CreateOrderResponse) Reset()
func (*CreateOrderResponse) String ¶
func (x *CreateOrderResponse) String() string
type GetOrderFilter ¶
type GetOrderFilter struct { CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` // contains filtered or unexported fields }
func (*GetOrderFilter) Descriptor
deprecated
func (*GetOrderFilter) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderFilter.ProtoReflect.Descriptor instead.
func (*GetOrderFilter) GetCustomerId ¶
func (x *GetOrderFilter) GetCustomerId() string
func (*GetOrderFilter) ProtoMessage ¶
func (*GetOrderFilter) ProtoMessage()
func (*GetOrderFilter) ProtoReflect ¶
func (x *GetOrderFilter) ProtoReflect() protoreflect.Message
func (*GetOrderFilter) Reset ¶
func (x *GetOrderFilter) Reset()
func (*GetOrderFilter) String ¶
func (x *GetOrderFilter) String() string
type GetOrderResponse ¶
type GetOrderResponse struct { Orders []*Order `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` // contains filtered or unexported fields }
func (*GetOrderResponse) Descriptor
deprecated
func (*GetOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetOrderResponse.ProtoReflect.Descriptor instead.
func (*GetOrderResponse) GetOrders ¶
func (x *GetOrderResponse) GetOrders() []*Order
func (*GetOrderResponse) ProtoMessage ¶
func (*GetOrderResponse) ProtoMessage()
func (*GetOrderResponse) ProtoReflect ¶
func (x *GetOrderResponse) ProtoReflect() protoreflect.Message
func (*GetOrderResponse) Reset ¶
func (x *GetOrderResponse) Reset()
func (*GetOrderResponse) String ¶
func (x *GetOrderResponse) String() string
type GetOrdersRequest ¶
type GetOrdersRequest struct { CustomerId string `protobuf:"bytes,1,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` Start int32 `protobuf:"varint,3,opt,name=start,proto3" json:"start,omitempty"` // contains filtered or unexported fields }
func (*GetOrdersRequest) Descriptor
deprecated
func (*GetOrdersRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetOrdersRequest.ProtoReflect.Descriptor instead.
func (*GetOrdersRequest) GetCount ¶
func (x *GetOrdersRequest) GetCount() int32
func (*GetOrdersRequest) GetCustomerId ¶
func (x *GetOrdersRequest) GetCustomerId() string
func (*GetOrdersRequest) GetStart ¶
func (x *GetOrdersRequest) GetStart() int32
func (*GetOrdersRequest) ProtoMessage ¶
func (*GetOrdersRequest) ProtoMessage()
func (*GetOrdersRequest) ProtoReflect ¶
func (x *GetOrdersRequest) ProtoReflect() protoreflect.Message
func (*GetOrdersRequest) Reset ¶
func (x *GetOrdersRequest) Reset()
func (*GetOrdersRequest) String ¶
func (x *GetOrdersRequest) String() string
type Order ¶
type Order struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` CustomerId string `protobuf:"bytes,2,opt,name=customer_id,json=customerId,proto3" json:"customer_id,omitempty"` ProductId string `protobuf:"bytes,3,opt,name=product_id,json=productId,proto3" json:"product_id,omitempty"` Quantity int32 `protobuf:"varint,4,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*Order) Descriptor
deprecated
func (*Order) GetCustomerId ¶
func (*Order) GetProductId ¶
func (*Order) GetQuantity ¶
func (*Order) ProtoMessage ¶
func (*Order) ProtoMessage()
func (*Order) ProtoReflect ¶
func (x *Order) ProtoReflect() protoreflect.Message
type OrderServiceClient ¶
type OrderServiceClient interface { CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*CreateOrderResponse, error) GetOrder(ctx context.Context, in *GetOrderFilter, opts ...grpc.CallOption) (*GetOrderResponse, error) GetOrders(ctx context.Context, in *GetOrdersRequest, opts ...grpc.CallOption) (OrderService_GetOrdersClient, error) }
OrderServiceClient is the client API for OrderService 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 NewOrderServiceClient ¶
func NewOrderServiceClient(cc grpc.ClientConnInterface) OrderServiceClient
type OrderServiceServer ¶
type OrderServiceServer interface { CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error) GetOrder(context.Context, *GetOrderFilter) (*GetOrderResponse, error) GetOrders(*GetOrdersRequest, OrderService_GetOrdersServer) error // contains filtered or unexported methods }
OrderServiceServer is the server API for OrderService service. All implementations must embed UnimplementedOrderServiceServer for forward compatibility
type OrderService_GetOrdersClient ¶
type OrderService_GetOrdersClient interface { Recv() (*GetOrderResponse, error) grpc.ClientStream }
type OrderService_GetOrdersServer ¶
type OrderService_GetOrdersServer interface { Send(*GetOrderResponse) error grpc.ServerStream }
type UnimplementedOrderServiceServer ¶
type UnimplementedOrderServiceServer struct { }
UnimplementedOrderServiceServer must be embedded to have forward compatible implementations.
func (UnimplementedOrderServiceServer) CreateOrder ¶
func (UnimplementedOrderServiceServer) CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error)
func (UnimplementedOrderServiceServer) GetOrder ¶
func (UnimplementedOrderServiceServer) GetOrder(context.Context, *GetOrderFilter) (*GetOrderResponse, error)
func (UnimplementedOrderServiceServer) GetOrders ¶
func (UnimplementedOrderServiceServer) GetOrders(*GetOrdersRequest, OrderService_GetOrdersServer) 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.