Documentation ¶
Index ¶
- Variables
- func RegisterOrderServiceServer(s grpc.ServiceRegistrar, srv OrderServiceServer)
- type CreateOrderRequest
- func (*CreateOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *CreateOrderRequest) GetCustomerName() string
- func (x *CreateOrderRequest) GetOrderItems() []*OrderItem
- 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() int64
- func (*CreateOrderResponse) ProtoMessage()
- func (x *CreateOrderResponse) ProtoReflect() protoreflect.Message
- func (x *CreateOrderResponse) Reset()
- func (x *CreateOrderResponse) String() string
- type Healthcheck
- func (*Healthcheck) Descriptor() ([]byte, []int)deprecated
- func (x *Healthcheck) GetStatus() string
- func (x *Healthcheck) GetStatusCode() int64
- func (*Healthcheck) ProtoMessage()
- func (x *Healthcheck) ProtoReflect() protoreflect.Message
- func (x *Healthcheck) Reset()
- func (x *Healthcheck) String() string
- type MenuItem
- func (*MenuItem) Descriptor() ([]byte, []int)deprecated
- func (x *MenuItem) GetDescription() string
- func (x *MenuItem) GetId() int64
- func (x *MenuItem) GetName() string
- func (x *MenuItem) GetPrice() float64
- func (*MenuItem) ProtoMessage()
- func (x *MenuItem) ProtoReflect() protoreflect.Message
- func (x *MenuItem) Reset()
- func (x *MenuItem) String() string
- type OrderItem
- type OrderServiceClient
- type OrderServiceServer
- type ReadAllMenuItemsResponse
- func (*ReadAllMenuItemsResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ReadAllMenuItemsResponse) GetMenuItemsList() []*MenuItem
- func (*ReadAllMenuItemsResponse) ProtoMessage()
- func (x *ReadAllMenuItemsResponse) ProtoReflect() protoreflect.Message
- func (x *ReadAllMenuItemsResponse) Reset()
- func (x *ReadAllMenuItemsResponse) String() string
- type UnimplementedOrderServiceServer
- type UnsafeOrderServiceServer
Constants ¶
This section is empty.
Variables ¶
var File_service_proto protoreflect.FileDescriptor
var OrderService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "v1.OrderService", HandlerType: (*OrderServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "CreateOrder", Handler: _OrderService_CreateOrder_Handler, }, { MethodName: "ReadAllMenuItems", Handler: _OrderService_ReadAllMenuItems_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "service.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 { OrderItems []*OrderItem `protobuf:"bytes,1,rep,name=orderItems,proto3" json:"orderItems,omitempty"` CustomerName string `protobuf:"bytes,2,opt,name=customerName,proto3" json:"customerName,omitempty"` // contains filtered or unexported fields }
func (*CreateOrderRequest) Descriptor
deprecated
func (*CreateOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use CreateOrderRequest.ProtoReflect.Descriptor instead.
func (*CreateOrderRequest) GetCustomerName ¶
func (x *CreateOrderRequest) GetCustomerName() string
func (*CreateOrderRequest) GetOrderItems ¶
func (x *CreateOrderRequest) GetOrderItems() []*OrderItem
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 int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,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() int64
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 Healthcheck ¶
type Healthcheck struct { StatusCode int64 `protobuf:"varint,1,opt,name=statusCode,proto3" json:"statusCode,omitempty"` Status string `protobuf:"bytes,2,opt,name=status,proto3" json:"status,omitempty"` // contains filtered or unexported fields }
func (*Healthcheck) Descriptor
deprecated
func (*Healthcheck) Descriptor() ([]byte, []int)
Deprecated: Use Healthcheck.ProtoReflect.Descriptor instead.
func (*Healthcheck) GetStatus ¶
func (x *Healthcheck) GetStatus() string
func (*Healthcheck) GetStatusCode ¶
func (x *Healthcheck) GetStatusCode() int64
func (*Healthcheck) ProtoMessage ¶
func (*Healthcheck) ProtoMessage()
func (*Healthcheck) ProtoReflect ¶
func (x *Healthcheck) ProtoReflect() protoreflect.Message
func (*Healthcheck) Reset ¶
func (x *Healthcheck) Reset()
func (*Healthcheck) String ¶
func (x *Healthcheck) String() string
type MenuItem ¶
type MenuItem struct { Id int64 `protobuf:"varint,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,3,opt,name=description,proto3" json:"description,omitempty"` Price float64 `protobuf:"fixed64,4,opt,name=price,proto3" json:"price,omitempty"` // contains filtered or unexported fields }
func (*MenuItem) Descriptor
deprecated
func (*MenuItem) GetDescription ¶
func (*MenuItem) ProtoMessage ¶
func (*MenuItem) ProtoMessage()
func (*MenuItem) ProtoReflect ¶
func (x *MenuItem) ProtoReflect() protoreflect.Message
type OrderItem ¶
type OrderItem struct { MenuItemID int64 `protobuf:"varint,1,opt,name=menuItemID,proto3" json:"menuItemID,omitempty"` Quantity int64 `protobuf:"varint,2,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*OrderItem) Descriptor
deprecated
func (*OrderItem) GetMenuItemID ¶
func (*OrderItem) GetQuantity ¶
func (*OrderItem) ProtoMessage ¶
func (*OrderItem) ProtoMessage()
func (*OrderItem) ProtoReflect ¶
func (x *OrderItem) ProtoReflect() protoreflect.Message
type OrderServiceClient ¶
type OrderServiceClient interface { CreateOrder(ctx context.Context, in *CreateOrderRequest, opts ...grpc.CallOption) (*CreateOrderResponse, error) ReadAllMenuItems(ctx context.Context, in *emptypb.Empty, opts ...grpc.CallOption) (*ReadAllMenuItemsResponse, 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) ReadAllMenuItems(context.Context, *emptypb.Empty) (*ReadAllMenuItemsResponse, error) }
OrderServiceServer is the server API for OrderService service. All implementations should embed UnimplementedOrderServiceServer for forward compatibility
type ReadAllMenuItemsResponse ¶
type ReadAllMenuItemsResponse struct { MenuItemsList []*MenuItem `protobuf:"bytes,1,rep,name=menuItemsList,proto3" json:"menuItemsList,omitempty"` // contains filtered or unexported fields }
func (*ReadAllMenuItemsResponse) Descriptor
deprecated
func (*ReadAllMenuItemsResponse) Descriptor() ([]byte, []int)
Deprecated: Use ReadAllMenuItemsResponse.ProtoReflect.Descriptor instead.
func (*ReadAllMenuItemsResponse) GetMenuItemsList ¶
func (x *ReadAllMenuItemsResponse) GetMenuItemsList() []*MenuItem
func (*ReadAllMenuItemsResponse) ProtoMessage ¶
func (*ReadAllMenuItemsResponse) ProtoMessage()
func (*ReadAllMenuItemsResponse) ProtoReflect ¶
func (x *ReadAllMenuItemsResponse) ProtoReflect() protoreflect.Message
func (*ReadAllMenuItemsResponse) Reset ¶
func (x *ReadAllMenuItemsResponse) Reset()
func (*ReadAllMenuItemsResponse) String ¶
func (x *ReadAllMenuItemsResponse) String() string
type UnimplementedOrderServiceServer ¶
type UnimplementedOrderServiceServer struct { }
UnimplementedOrderServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedOrderServiceServer) CreateOrder ¶
func (UnimplementedOrderServiceServer) CreateOrder(context.Context, *CreateOrderRequest) (*CreateOrderResponse, error)
func (UnimplementedOrderServiceServer) ReadAllMenuItems ¶
func (UnimplementedOrderServiceServer) ReadAllMenuItems(context.Context, *emptypb.Empty) (*ReadAllMenuItemsResponse, 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.