Documentation ¶
Overview ¶
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Package gen is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterCounterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterCounterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CounterServiceClient) error
- func RegisterCounterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterCounterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CounterServiceServer) error
- func RegisterCounterServiceServer(s grpc.ServiceRegistrar, srv CounterServiceServer)
- func RegisterProductServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterProductServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProductServiceClient) error
- func RegisterProductServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterProductServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProductServiceServer) error
- func RegisterProductServiceServer(s grpc.ServiceRegistrar, srv ProductServiceServer)
- type CommandItem
- type CommandType
- func (CommandType) Descriptor() protoreflect.EnumDescriptor
- func (x CommandType) Enum() *CommandType
- func (CommandType) EnumDescriptor() ([]byte, []int)deprecated
- func (x CommandType) Number() protoreflect.EnumNumber
- func (x CommandType) String() string
- func (CommandType) Type() protoreflect.EnumType
- type CounterServiceClient
- type CounterServiceServer
- type GetItemTypesRequest
- type GetItemTypesResponse
- func (*GetItemTypesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetItemTypesResponse) GetItemTypes() []*ItemTypeDto
- func (*GetItemTypesResponse) ProtoMessage()
- func (x *GetItemTypesResponse) ProtoReflect() protoreflect.Message
- func (x *GetItemTypesResponse) Reset()
- func (x *GetItemTypesResponse) String() string
- type GetItemsByTypeRequest
- func (*GetItemsByTypeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetItemsByTypeRequest) GetItemTypes() string
- func (*GetItemsByTypeRequest) ProtoMessage()
- func (x *GetItemsByTypeRequest) ProtoReflect() protoreflect.Message
- func (x *GetItemsByTypeRequest) Reset()
- func (x *GetItemsByTypeRequest) String() string
- type GetItemsByTypeResponse
- func (*GetItemsByTypeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetItemsByTypeResponse) GetItems() []*ItemDto
- func (*GetItemsByTypeResponse) ProtoMessage()
- func (x *GetItemsByTypeResponse) ProtoReflect() protoreflect.Message
- func (x *GetItemsByTypeResponse) Reset()
- func (x *GetItemsByTypeResponse) String() string
- type GetListOrderFulfillmentRequest
- func (*GetListOrderFulfillmentRequest) Descriptor() ([]byte, []int)deprecated
- func (*GetListOrderFulfillmentRequest) ProtoMessage()
- func (x *GetListOrderFulfillmentRequest) ProtoReflect() protoreflect.Message
- func (x *GetListOrderFulfillmentRequest) Reset()
- func (x *GetListOrderFulfillmentRequest) String() string
- type GetListOrderFulfillmentResponse
- func (*GetListOrderFulfillmentResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetListOrderFulfillmentResponse) GetOrders() []*OrderDto
- func (*GetListOrderFulfillmentResponse) ProtoMessage()
- func (x *GetListOrderFulfillmentResponse) ProtoReflect() protoreflect.Message
- func (x *GetListOrderFulfillmentResponse) Reset()
- func (x *GetListOrderFulfillmentResponse) String() string
- type ItemDto
- type ItemType
- type ItemTypeDto
- func (*ItemTypeDto) Descriptor() ([]byte, []int)deprecated
- func (x *ItemTypeDto) GetImage() string
- func (x *ItemTypeDto) GetName() string
- func (x *ItemTypeDto) GetPrice() float64
- func (x *ItemTypeDto) GetType() int32
- func (*ItemTypeDto) ProtoMessage()
- func (x *ItemTypeDto) ProtoReflect() protoreflect.Message
- func (x *ItemTypeDto) Reset()
- func (x *ItemTypeDto) String() string
- type LineItemDto
- func (*LineItemDto) Descriptor() ([]byte, []int)deprecated
- func (x *LineItemDto) GetId() string
- func (x *LineItemDto) GetIsBaristaOrder() bool
- func (x *LineItemDto) GetItemStatus() Status
- func (x *LineItemDto) GetItemType() ItemType
- func (x *LineItemDto) GetName() string
- func (x *LineItemDto) GetPrice() float64
- func (*LineItemDto) ProtoMessage()
- func (x *LineItemDto) ProtoReflect() protoreflect.Message
- func (x *LineItemDto) Reset()
- func (x *LineItemDto) String() string
- type Location
- type OrderDto
- func (*OrderDto) Descriptor() ([]byte, []int)deprecated
- func (x *OrderDto) GetId() string
- func (x *OrderDto) GetLineItems() []*LineItemDto
- func (x *OrderDto) GetLocaltion() Location
- func (x *OrderDto) GetLoyaltyMemberId() string
- func (x *OrderDto) GetOrderSource() OrderSource
- func (x *OrderDto) GetOrderStatus() Status
- func (*OrderDto) ProtoMessage()
- func (x *OrderDto) ProtoReflect() protoreflect.Message
- func (x *OrderDto) Reset()
- func (x *OrderDto) String() string
- type OrderSource
- func (OrderSource) Descriptor() protoreflect.EnumDescriptor
- func (x OrderSource) Enum() *OrderSource
- func (OrderSource) EnumDescriptor() ([]byte, []int)deprecated
- func (x OrderSource) Number() protoreflect.EnumNumber
- func (x OrderSource) String() string
- func (OrderSource) Type() protoreflect.EnumType
- type PlaceOrderRequest
- func (*PlaceOrderRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PlaceOrderRequest) GetBaristaItems() []*CommandItem
- func (x *PlaceOrderRequest) GetCommandType() CommandType
- func (x *PlaceOrderRequest) GetKitchenItems() []*CommandItem
- func (x *PlaceOrderRequest) GetLocation() Location
- func (x *PlaceOrderRequest) GetLoyaltyMemberId() string
- func (x *PlaceOrderRequest) GetOrderSource() OrderSource
- func (x *PlaceOrderRequest) GetTimestamp() *timestamppb.Timestamp
- func (*PlaceOrderRequest) ProtoMessage()
- func (x *PlaceOrderRequest) ProtoReflect() protoreflect.Message
- func (x *PlaceOrderRequest) Reset()
- func (x *PlaceOrderRequest) String() string
- type PlaceOrderResponse
- type ProductServiceClient
- type ProductServiceServer
- type Status
- type UnimplementedCounterServiceServer
- type UnimplementedProductServiceServer
- type UnsafeCounterServiceServer
- type UnsafeProductServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( OrderSource_name = map[int32]string{ 0: "COUNTER", 1: "WEB", } OrderSource_value = map[string]int32{ "COUNTER": 0, "WEB": 1, } )
Enum value maps for OrderSource.
var ( Status_name = map[int32]string{ 0: "PLACED", 1: "IN_PROGRESS", 2: "FULFILLED", } Status_value = map[string]int32{ "PLACED": 0, "IN_PROGRESS": 1, "FULFILLED": 2, } )
Enum value maps for Status.
var ( Location_name = map[int32]string{ 0: "ATLANTA", 1: "CHARLOTTE", 2: "RALEIGH", } Location_value = map[string]int32{ "ATLANTA": 0, "CHARLOTTE": 1, "RALEIGH": 2, } )
Enum value maps for Location.
var ( ItemType_name = map[int32]string{ 0: "CAPPUCCINO", 1: "COFFEE_BLACK", 2: "COFFEE_WITH_ROOM", 3: "ESPRESSO", 4: "ESPRESSO_DOUBLE", 5: "LATTE", 6: "CAKEPOP", 7: "CROISSANT", 8: "MUFFIN", 9: "CROISSANT_CHOCOLATE", } ItemType_value = map[string]int32{ "CAPPUCCINO": 0, "COFFEE_BLACK": 1, "COFFEE_WITH_ROOM": 2, "ESPRESSO": 3, "ESPRESSO_DOUBLE": 4, "LATTE": 5, "CAKEPOP": 6, "CROISSANT": 7, "MUFFIN": 8, "CROISSANT_CHOCOLATE": 9, } )
Enum value maps for ItemType.
var ( CommandType_name = map[int32]string{ 0: "PLACE_ORDER", } CommandType_value = map[string]int32{ "PLACE_ORDER": 0, } )
Enum value maps for CommandType.
var CounterService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "go.coffeeshop.proto.counterapi.CounterService", HandlerType: (*CounterServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetListOrderFulfillment", Handler: _CounterService_GetListOrderFulfillment_Handler, }, { MethodName: "PlaceOrder", Handler: _CounterService_PlaceOrder_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "counter.proto", }
CounterService_ServiceDesc is the grpc.ServiceDesc for CounterService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_common_proto protoreflect.FileDescriptor
var File_counter_proto protoreflect.FileDescriptor
var File_product_proto protoreflect.FileDescriptor
var ProductService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "go.coffeeshop.proto.productapi.ProductService", HandlerType: (*ProductServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetItemTypes", Handler: _ProductService_GetItemTypes_Handler, }, { MethodName: "GetItemsByType", Handler: _ProductService_GetItemsByType_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "product.proto", }
ProductService_ServiceDesc is the grpc.ServiceDesc for ProductService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterCounterServiceHandler ¶
func RegisterCounterServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterCounterServiceHandler registers the http handlers for service CounterService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterCounterServiceHandlerClient ¶
func RegisterCounterServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client CounterServiceClient) error
RegisterCounterServiceHandlerClient registers the http handlers for service CounterService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "CounterServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "CounterServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "CounterServiceClient" to call the correct interceptors.
func RegisterCounterServiceHandlerFromEndpoint ¶
func RegisterCounterServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterCounterServiceHandlerFromEndpoint is same as RegisterCounterServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterCounterServiceHandlerServer ¶
func RegisterCounterServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server CounterServiceServer) error
RegisterCounterServiceHandlerServer registers the http handlers for service CounterService to "mux". UnaryRPC :call CounterServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterCounterServiceHandlerFromEndpoint instead.
func RegisterCounterServiceServer ¶
func RegisterCounterServiceServer(s grpc.ServiceRegistrar, srv CounterServiceServer)
func RegisterProductServiceHandler ¶
func RegisterProductServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterProductServiceHandler registers the http handlers for service ProductService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterProductServiceHandlerClient ¶
func RegisterProductServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client ProductServiceClient) error
RegisterProductServiceHandlerClient registers the http handlers for service ProductService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "ProductServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "ProductServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "ProductServiceClient" to call the correct interceptors.
func RegisterProductServiceHandlerFromEndpoint ¶
func RegisterProductServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterProductServiceHandlerFromEndpoint is same as RegisterProductServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterProductServiceHandlerServer ¶
func RegisterProductServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server ProductServiceServer) error
RegisterProductServiceHandlerServer registers the http handlers for service ProductService to "mux". UnaryRPC :call ProductServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906. Note that using this registration option will cause many gRPC library features to stop working. Consider using RegisterProductServiceHandlerFromEndpoint instead.
func RegisterProductServiceServer ¶
func RegisterProductServiceServer(s grpc.ServiceRegistrar, srv ProductServiceServer)
Types ¶
type CommandItem ¶
type CommandItem struct { ItemType ItemType `` /* 127-byte string literal not displayed */ // contains filtered or unexported fields }
func (*CommandItem) Descriptor
deprecated
func (*CommandItem) Descriptor() ([]byte, []int)
Deprecated: Use CommandItem.ProtoReflect.Descriptor instead.
func (*CommandItem) GetItemType ¶
func (x *CommandItem) GetItemType() ItemType
func (*CommandItem) ProtoMessage ¶
func (*CommandItem) ProtoMessage()
func (*CommandItem) ProtoReflect ¶
func (x *CommandItem) ProtoReflect() protoreflect.Message
func (*CommandItem) Reset ¶
func (x *CommandItem) Reset()
func (*CommandItem) String ¶
func (x *CommandItem) String() string
type CommandType ¶
type CommandType int32
const (
CommandType_PLACE_ORDER CommandType = 0
)
func (CommandType) Descriptor ¶
func (CommandType) Descriptor() protoreflect.EnumDescriptor
func (CommandType) Enum ¶
func (x CommandType) Enum() *CommandType
func (CommandType) EnumDescriptor
deprecated
func (CommandType) EnumDescriptor() ([]byte, []int)
Deprecated: Use CommandType.Descriptor instead.
func (CommandType) Number ¶
func (x CommandType) Number() protoreflect.EnumNumber
func (CommandType) String ¶
func (x CommandType) String() string
func (CommandType) Type ¶
func (CommandType) Type() protoreflect.EnumType
type CounterServiceClient ¶
type CounterServiceClient interface { GetListOrderFulfillment(ctx context.Context, in *GetListOrderFulfillmentRequest, opts ...grpc.CallOption) (*GetListOrderFulfillmentResponse, error) PlaceOrder(ctx context.Context, in *PlaceOrderRequest, opts ...grpc.CallOption) (*PlaceOrderResponse, error) }
CounterServiceClient is the client API for CounterService 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 NewCounterServiceClient ¶
func NewCounterServiceClient(cc grpc.ClientConnInterface) CounterServiceClient
type CounterServiceServer ¶
type CounterServiceServer interface { GetListOrderFulfillment(context.Context, *GetListOrderFulfillmentRequest) (*GetListOrderFulfillmentResponse, error) PlaceOrder(context.Context, *PlaceOrderRequest) (*PlaceOrderResponse, error) }
CounterServiceServer is the server API for CounterService service. All implementations should embed UnimplementedCounterServiceServer for forward compatibility
type GetItemTypesRequest ¶
type GetItemTypesRequest struct {
// contains filtered or unexported fields
}
func (*GetItemTypesRequest) Descriptor
deprecated
func (*GetItemTypesRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetItemTypesRequest.ProtoReflect.Descriptor instead.
func (*GetItemTypesRequest) ProtoMessage ¶
func (*GetItemTypesRequest) ProtoMessage()
func (*GetItemTypesRequest) ProtoReflect ¶
func (x *GetItemTypesRequest) ProtoReflect() protoreflect.Message
func (*GetItemTypesRequest) Reset ¶
func (x *GetItemTypesRequest) Reset()
func (*GetItemTypesRequest) String ¶
func (x *GetItemTypesRequest) String() string
type GetItemTypesResponse ¶
type GetItemTypesResponse struct { ItemTypes []*ItemTypeDto `protobuf:"bytes,1,rep,name=item_types,json=itemTypes,proto3" json:"item_types,omitempty"` // contains filtered or unexported fields }
func (*GetItemTypesResponse) Descriptor
deprecated
func (*GetItemTypesResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetItemTypesResponse.ProtoReflect.Descriptor instead.
func (*GetItemTypesResponse) GetItemTypes ¶
func (x *GetItemTypesResponse) GetItemTypes() []*ItemTypeDto
func (*GetItemTypesResponse) ProtoMessage ¶
func (*GetItemTypesResponse) ProtoMessage()
func (*GetItemTypesResponse) ProtoReflect ¶
func (x *GetItemTypesResponse) ProtoReflect() protoreflect.Message
func (*GetItemTypesResponse) Reset ¶
func (x *GetItemTypesResponse) Reset()
func (*GetItemTypesResponse) String ¶
func (x *GetItemTypesResponse) String() string
type GetItemsByTypeRequest ¶
type GetItemsByTypeRequest struct { ItemTypes string `protobuf:"bytes,1,opt,name=item_types,json=itemTypes,proto3" json:"item_types,omitempty"` // contains filtered or unexported fields }
func (*GetItemsByTypeRequest) Descriptor
deprecated
func (*GetItemsByTypeRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetItemsByTypeRequest.ProtoReflect.Descriptor instead.
func (*GetItemsByTypeRequest) GetItemTypes ¶
func (x *GetItemsByTypeRequest) GetItemTypes() string
func (*GetItemsByTypeRequest) ProtoMessage ¶
func (*GetItemsByTypeRequest) ProtoMessage()
func (*GetItemsByTypeRequest) ProtoReflect ¶
func (x *GetItemsByTypeRequest) ProtoReflect() protoreflect.Message
func (*GetItemsByTypeRequest) Reset ¶
func (x *GetItemsByTypeRequest) Reset()
func (*GetItemsByTypeRequest) String ¶
func (x *GetItemsByTypeRequest) String() string
type GetItemsByTypeResponse ¶
type GetItemsByTypeResponse struct { Items []*ItemDto `protobuf:"bytes,1,rep,name=items,proto3" json:"items,omitempty"` // contains filtered or unexported fields }
func (*GetItemsByTypeResponse) Descriptor
deprecated
func (*GetItemsByTypeResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetItemsByTypeResponse.ProtoReflect.Descriptor instead.
func (*GetItemsByTypeResponse) GetItems ¶
func (x *GetItemsByTypeResponse) GetItems() []*ItemDto
func (*GetItemsByTypeResponse) ProtoMessage ¶
func (*GetItemsByTypeResponse) ProtoMessage()
func (*GetItemsByTypeResponse) ProtoReflect ¶
func (x *GetItemsByTypeResponse) ProtoReflect() protoreflect.Message
func (*GetItemsByTypeResponse) Reset ¶
func (x *GetItemsByTypeResponse) Reset()
func (*GetItemsByTypeResponse) String ¶
func (x *GetItemsByTypeResponse) String() string
type GetListOrderFulfillmentRequest ¶
type GetListOrderFulfillmentRequest struct {
// contains filtered or unexported fields
}
func (*GetListOrderFulfillmentRequest) Descriptor
deprecated
func (*GetListOrderFulfillmentRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetListOrderFulfillmentRequest.ProtoReflect.Descriptor instead.
func (*GetListOrderFulfillmentRequest) ProtoMessage ¶
func (*GetListOrderFulfillmentRequest) ProtoMessage()
func (*GetListOrderFulfillmentRequest) ProtoReflect ¶
func (x *GetListOrderFulfillmentRequest) ProtoReflect() protoreflect.Message
func (*GetListOrderFulfillmentRequest) Reset ¶
func (x *GetListOrderFulfillmentRequest) Reset()
func (*GetListOrderFulfillmentRequest) String ¶
func (x *GetListOrderFulfillmentRequest) String() string
type GetListOrderFulfillmentResponse ¶
type GetListOrderFulfillmentResponse struct { Orders []*OrderDto `protobuf:"bytes,1,rep,name=orders,proto3" json:"orders,omitempty"` // contains filtered or unexported fields }
func (*GetListOrderFulfillmentResponse) Descriptor
deprecated
func (*GetListOrderFulfillmentResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetListOrderFulfillmentResponse.ProtoReflect.Descriptor instead.
func (*GetListOrderFulfillmentResponse) GetOrders ¶
func (x *GetListOrderFulfillmentResponse) GetOrders() []*OrderDto
func (*GetListOrderFulfillmentResponse) ProtoMessage ¶
func (*GetListOrderFulfillmentResponse) ProtoMessage()
func (*GetListOrderFulfillmentResponse) ProtoReflect ¶
func (x *GetListOrderFulfillmentResponse) ProtoReflect() protoreflect.Message
func (*GetListOrderFulfillmentResponse) Reset ¶
func (x *GetListOrderFulfillmentResponse) Reset()
func (*GetListOrderFulfillmentResponse) String ¶
func (x *GetListOrderFulfillmentResponse) String() string
type ItemDto ¶
type ItemDto struct { Price float64 `protobuf:"fixed64,1,opt,name=price,proto3" json:"price,omitempty"` Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` // contains filtered or unexported fields }
func (*ItemDto) Descriptor
deprecated
func (*ItemDto) ProtoMessage ¶
func (*ItemDto) ProtoMessage()
func (*ItemDto) ProtoReflect ¶
func (x *ItemDto) ProtoReflect() protoreflect.Message
type ItemType ¶
type ItemType int32
const ( // Beverages ItemType_CAPPUCCINO ItemType = 0 ItemType_COFFEE_BLACK ItemType = 1 ItemType_COFFEE_WITH_ROOM ItemType = 2 ItemType_ESPRESSO ItemType = 3 ItemType_ESPRESSO_DOUBLE ItemType = 4 ItemType_LATTE ItemType = 5 // Food ItemType_CAKEPOP ItemType = 6 ItemType_CROISSANT ItemType = 7 ItemType_MUFFIN ItemType = 8 ItemType_CROISSANT_CHOCOLATE ItemType = 9 )
func (ItemType) Descriptor ¶
func (ItemType) Descriptor() protoreflect.EnumDescriptor
func (ItemType) EnumDescriptor
deprecated
func (ItemType) Number ¶
func (x ItemType) Number() protoreflect.EnumNumber
func (ItemType) Type ¶
func (ItemType) Type() protoreflect.EnumType
type ItemTypeDto ¶
type ItemTypeDto struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Type int32 `protobuf:"varint,2,opt,name=type,proto3" json:"type,omitempty"` Price float64 `protobuf:"fixed64,3,opt,name=price,proto3" json:"price,omitempty"` Image string `protobuf:"bytes,4,opt,name=image,proto3" json:"image,omitempty"` // contains filtered or unexported fields }
func (*ItemTypeDto) Descriptor
deprecated
func (*ItemTypeDto) Descriptor() ([]byte, []int)
Deprecated: Use ItemTypeDto.ProtoReflect.Descriptor instead.
func (*ItemTypeDto) GetImage ¶
func (x *ItemTypeDto) GetImage() string
func (*ItemTypeDto) GetName ¶
func (x *ItemTypeDto) GetName() string
func (*ItemTypeDto) GetPrice ¶
func (x *ItemTypeDto) GetPrice() float64
func (*ItemTypeDto) GetType ¶
func (x *ItemTypeDto) GetType() int32
func (*ItemTypeDto) ProtoMessage ¶
func (*ItemTypeDto) ProtoMessage()
func (*ItemTypeDto) ProtoReflect ¶
func (x *ItemTypeDto) ProtoReflect() protoreflect.Message
func (*ItemTypeDto) Reset ¶
func (x *ItemTypeDto) Reset()
func (*ItemTypeDto) String ¶
func (x *ItemTypeDto) String() string
type LineItemDto ¶
type LineItemDto struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` ItemType ItemType `` /* 127-byte string literal not displayed */ Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` Price float64 `protobuf:"fixed64,4,opt,name=price,proto3" json:"price,omitempty"` ItemStatus Status `` /* 131-byte string literal not displayed */ IsBaristaOrder bool `protobuf:"varint,6,opt,name=is_barista_order,json=isBaristaOrder,proto3" json:"is_barista_order,omitempty"` // contains filtered or unexported fields }
func (*LineItemDto) Descriptor
deprecated
func (*LineItemDto) Descriptor() ([]byte, []int)
Deprecated: Use LineItemDto.ProtoReflect.Descriptor instead.
func (*LineItemDto) GetId ¶
func (x *LineItemDto) GetId() string
func (*LineItemDto) GetIsBaristaOrder ¶
func (x *LineItemDto) GetIsBaristaOrder() bool
func (*LineItemDto) GetItemStatus ¶
func (x *LineItemDto) GetItemStatus() Status
func (*LineItemDto) GetItemType ¶
func (x *LineItemDto) GetItemType() ItemType
func (*LineItemDto) GetName ¶
func (x *LineItemDto) GetName() string
func (*LineItemDto) GetPrice ¶
func (x *LineItemDto) GetPrice() float64
func (*LineItemDto) ProtoMessage ¶
func (*LineItemDto) ProtoMessage()
func (*LineItemDto) ProtoReflect ¶
func (x *LineItemDto) ProtoReflect() protoreflect.Message
func (*LineItemDto) Reset ¶
func (x *LineItemDto) Reset()
func (*LineItemDto) String ¶
func (x *LineItemDto) String() string
type Location ¶
type Location int32
func (Location) Descriptor ¶
func (Location) Descriptor() protoreflect.EnumDescriptor
func (Location) EnumDescriptor
deprecated
func (Location) Number ¶
func (x Location) Number() protoreflect.EnumNumber
func (Location) Type ¶
func (Location) Type() protoreflect.EnumType
type OrderDto ¶
type OrderDto struct { Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` OrderSource OrderSource `` /* 139-byte string literal not displayed */ LoyaltyMemberId string `protobuf:"bytes,3,opt,name=loyalty_member_id,json=loyaltyMemberId,proto3" json:"loyalty_member_id,omitempty"` OrderStatus Status `` /* 134-byte string literal not displayed */ Localtion Location `protobuf:"varint,5,opt,name=localtion,proto3,enum=go.coffeeshop.proto.common.Location" json:"localtion,omitempty"` LineItems []*LineItemDto `protobuf:"bytes,6,rep,name=line_items,json=lineItems,proto3" json:"line_items,omitempty"` // contains filtered or unexported fields }
func (*OrderDto) Descriptor
deprecated
func (*OrderDto) GetLineItems ¶
func (x *OrderDto) GetLineItems() []*LineItemDto
func (*OrderDto) GetLocaltion ¶
func (*OrderDto) GetLoyaltyMemberId ¶
func (*OrderDto) GetOrderSource ¶
func (x *OrderDto) GetOrderSource() OrderSource
func (*OrderDto) GetOrderStatus ¶
func (*OrderDto) ProtoMessage ¶
func (*OrderDto) ProtoMessage()
func (*OrderDto) ProtoReflect ¶
func (x *OrderDto) ProtoReflect() protoreflect.Message
type OrderSource ¶
type OrderSource int32
const ( OrderSource_COUNTER OrderSource = 0 OrderSource_WEB OrderSource = 1 )
func (OrderSource) Descriptor ¶
func (OrderSource) Descriptor() protoreflect.EnumDescriptor
func (OrderSource) Enum ¶
func (x OrderSource) Enum() *OrderSource
func (OrderSource) EnumDescriptor
deprecated
func (OrderSource) EnumDescriptor() ([]byte, []int)
Deprecated: Use OrderSource.Descriptor instead.
func (OrderSource) Number ¶
func (x OrderSource) Number() protoreflect.EnumNumber
func (OrderSource) String ¶
func (x OrderSource) String() string
func (OrderSource) Type ¶
func (OrderSource) Type() protoreflect.EnumType
type PlaceOrderRequest ¶
type PlaceOrderRequest struct { CommandType CommandType `` /* 139-byte string literal not displayed */ OrderSource OrderSource `` /* 139-byte string literal not displayed */ Location Location `protobuf:"varint,3,opt,name=location,proto3,enum=go.coffeeshop.proto.common.Location" json:"location,omitempty"` LoyaltyMemberId string `protobuf:"bytes,4,opt,name=loyalty_member_id,json=loyaltyMemberId,proto3" json:"loyalty_member_id,omitempty"` BaristaItems []*CommandItem `protobuf:"bytes,5,rep,name=barista_items,json=baristaItems,proto3" json:"barista_items,omitempty"` KitchenItems []*CommandItem `protobuf:"bytes,6,rep,name=kitchen_items,json=kitchenItems,proto3" json:"kitchen_items,omitempty"` Timestamp *timestamppb.Timestamp `protobuf:"bytes,7,opt,name=timestamp,proto3" json:"timestamp,omitempty"` // contains filtered or unexported fields }
func (*PlaceOrderRequest) Descriptor
deprecated
func (*PlaceOrderRequest) Descriptor() ([]byte, []int)
Deprecated: Use PlaceOrderRequest.ProtoReflect.Descriptor instead.
func (*PlaceOrderRequest) GetBaristaItems ¶
func (x *PlaceOrderRequest) GetBaristaItems() []*CommandItem
func (*PlaceOrderRequest) GetCommandType ¶
func (x *PlaceOrderRequest) GetCommandType() CommandType
func (*PlaceOrderRequest) GetKitchenItems ¶
func (x *PlaceOrderRequest) GetKitchenItems() []*CommandItem
func (*PlaceOrderRequest) GetLocation ¶
func (x *PlaceOrderRequest) GetLocation() Location
func (*PlaceOrderRequest) GetLoyaltyMemberId ¶
func (x *PlaceOrderRequest) GetLoyaltyMemberId() string
func (*PlaceOrderRequest) GetOrderSource ¶
func (x *PlaceOrderRequest) GetOrderSource() OrderSource
func (*PlaceOrderRequest) GetTimestamp ¶
func (x *PlaceOrderRequest) GetTimestamp() *timestamppb.Timestamp
func (*PlaceOrderRequest) ProtoMessage ¶
func (*PlaceOrderRequest) ProtoMessage()
func (*PlaceOrderRequest) ProtoReflect ¶
func (x *PlaceOrderRequest) ProtoReflect() protoreflect.Message
func (*PlaceOrderRequest) Reset ¶
func (x *PlaceOrderRequest) Reset()
func (*PlaceOrderRequest) String ¶
func (x *PlaceOrderRequest) String() string
type PlaceOrderResponse ¶
type PlaceOrderResponse struct {
// contains filtered or unexported fields
}
func (*PlaceOrderResponse) Descriptor
deprecated
func (*PlaceOrderResponse) Descriptor() ([]byte, []int)
Deprecated: Use PlaceOrderResponse.ProtoReflect.Descriptor instead.
func (*PlaceOrderResponse) ProtoMessage ¶
func (*PlaceOrderResponse) ProtoMessage()
func (*PlaceOrderResponse) ProtoReflect ¶
func (x *PlaceOrderResponse) ProtoReflect() protoreflect.Message
func (*PlaceOrderResponse) Reset ¶
func (x *PlaceOrderResponse) Reset()
func (*PlaceOrderResponse) String ¶
func (x *PlaceOrderResponse) String() string
type ProductServiceClient ¶
type ProductServiceClient interface { GetItemTypes(ctx context.Context, in *GetItemTypesRequest, opts ...grpc.CallOption) (*GetItemTypesResponse, error) GetItemsByType(ctx context.Context, in *GetItemsByTypeRequest, opts ...grpc.CallOption) (*GetItemsByTypeResponse, error) }
ProductServiceClient is the client API for ProductService 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 NewProductServiceClient ¶
func NewProductServiceClient(cc grpc.ClientConnInterface) ProductServiceClient
type ProductServiceServer ¶
type ProductServiceServer interface { GetItemTypes(context.Context, *GetItemTypesRequest) (*GetItemTypesResponse, error) GetItemsByType(context.Context, *GetItemsByTypeRequest) (*GetItemsByTypeResponse, error) }
ProductServiceServer is the server API for ProductService service. All implementations should embed UnimplementedProductServiceServer for forward compatibility
type Status ¶
type Status int32
func (Status) Descriptor ¶
func (Status) Descriptor() protoreflect.EnumDescriptor
func (Status) EnumDescriptor
deprecated
func (Status) Number ¶
func (x Status) Number() protoreflect.EnumNumber
func (Status) Type ¶
func (Status) Type() protoreflect.EnumType
type UnimplementedCounterServiceServer ¶
type UnimplementedCounterServiceServer struct { }
UnimplementedCounterServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedCounterServiceServer) GetListOrderFulfillment ¶
func (UnimplementedCounterServiceServer) GetListOrderFulfillment(context.Context, *GetListOrderFulfillmentRequest) (*GetListOrderFulfillmentResponse, error)
func (UnimplementedCounterServiceServer) PlaceOrder ¶
func (UnimplementedCounterServiceServer) PlaceOrder(context.Context, *PlaceOrderRequest) (*PlaceOrderResponse, error)
type UnimplementedProductServiceServer ¶
type UnimplementedProductServiceServer struct { }
UnimplementedProductServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedProductServiceServer) GetItemTypes ¶
func (UnimplementedProductServiceServer) GetItemTypes(context.Context, *GetItemTypesRequest) (*GetItemTypesResponse, error)
func (UnimplementedProductServiceServer) GetItemsByType ¶
func (UnimplementedProductServiceServer) GetItemsByType(context.Context, *GetItemsByTypeRequest) (*GetItemsByTypeResponse, error)
type UnsafeCounterServiceServer ¶
type UnsafeCounterServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCounterServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CounterServiceServer will result in compilation errors.
type UnsafeProductServiceServer ¶
type UnsafeProductServiceServer interface {
// contains filtered or unexported methods
}
UnsafeProductServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to ProductServiceServer will result in compilation errors.