Documentation ¶
Index ¶
- Variables
- func RegisterBakeryServiceServer(s grpc.ServiceRegistrar, srv BakeryServiceServer)
- type BakePizzaRequest
- func (*BakePizzaRequest) Descriptor() ([]byte, []int)deprecated
- func (x *BakePizzaRequest) GetName() string
- func (x *BakePizzaRequest) GetToppings() []*Toppings
- func (*BakePizzaRequest) ProtoMessage()
- func (x *BakePizzaRequest) ProtoReflect() protoreflect.Message
- func (x *BakePizzaRequest) Reset()
- func (x *BakePizzaRequest) String() string
- type BakePizzaResponse
- func (*BakePizzaResponse) Descriptor() ([]byte, []int)deprecated
- func (x *BakePizzaResponse) GetId() string
- func (x *BakePizzaResponse) GetName() string
- func (x *BakePizzaResponse) GetStatus() BakePizzaResponse_BakeStatus
- func (*BakePizzaResponse) ProtoMessage()
- func (x *BakePizzaResponse) ProtoReflect() protoreflect.Message
- func (x *BakePizzaResponse) Reset()
- func (x *BakePizzaResponse) String() string
- type BakePizzaResponse_BakeStatus
- func (BakePizzaResponse_BakeStatus) Descriptor() protoreflect.EnumDescriptor
- func (x BakePizzaResponse_BakeStatus) Enum() *BakePizzaResponse_BakeStatus
- func (BakePizzaResponse_BakeStatus) EnumDescriptor() ([]byte, []int)deprecated
- func (x BakePizzaResponse_BakeStatus) Number() protoreflect.EnumNumber
- func (x BakePizzaResponse_BakeStatus) String() string
- func (BakePizzaResponse_BakeStatus) Type() protoreflect.EnumType
- type BakeryServiceClient
- type BakeryServiceServer
- type BakeryService_BakePizzaClient
- type BakeryService_BakePizzaServer
- type Toppings
- type UnimplementedBakeryServiceServer
- type UnsafeBakeryServiceServer
Constants ¶
This section is empty.
Variables ¶
var ( BakePizzaResponse_BakeStatus_name = map[int32]string{ 0: "BAKE_STATUS_UNSPECIFIED", 1: "BAKE_STATUS_PREPARING", 2: "BAKE_STATUS_BAKING", 3: "BAKE_STATUS_READY", } BakePizzaResponse_BakeStatus_value = map[string]int32{ "BAKE_STATUS_UNSPECIFIED": 0, "BAKE_STATUS_PREPARING": 1, "BAKE_STATUS_BAKING": 2, "BAKE_STATUS_READY": 3, } )
Enum value maps for BakePizzaResponse_BakeStatus.
var BakeryService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "bakery.v1.BakeryService", HandlerType: (*BakeryServiceServer)(nil), Methods: []grpc.MethodDesc{}, Streams: []grpc.StreamDesc{ { StreamName: "BakePizza", Handler: _BakeryService_BakePizza_Handler, ServerStreams: true, }, }, Metadata: "bakery/v1/bakery.proto", }
BakeryService_ServiceDesc is the grpc.ServiceDesc for BakeryService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_bakery_v1_bakery_proto protoreflect.FileDescriptor
Functions ¶
func RegisterBakeryServiceServer ¶
func RegisterBakeryServiceServer(s grpc.ServiceRegistrar, srv BakeryServiceServer)
Types ¶
type BakePizzaRequest ¶
type BakePizzaRequest struct { Toppings []*Toppings `protobuf:"bytes,1,rep,name=toppings,proto3" json:"toppings,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*BakePizzaRequest) Descriptor
deprecated
func (*BakePizzaRequest) Descriptor() ([]byte, []int)
Deprecated: Use BakePizzaRequest.ProtoReflect.Descriptor instead.
func (*BakePizzaRequest) GetName ¶
func (x *BakePizzaRequest) GetName() string
func (*BakePizzaRequest) GetToppings ¶
func (x *BakePizzaRequest) GetToppings() []*Toppings
func (*BakePizzaRequest) ProtoMessage ¶
func (*BakePizzaRequest) ProtoMessage()
func (*BakePizzaRequest) ProtoReflect ¶
func (x *BakePizzaRequest) ProtoReflect() protoreflect.Message
func (*BakePizzaRequest) Reset ¶
func (x *BakePizzaRequest) Reset()
func (*BakePizzaRequest) String ¶
func (x *BakePizzaRequest) String() string
type BakePizzaResponse ¶
type BakePizzaResponse struct { // id of the pizza // represents the id of the pizza in the whole system Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // current Status of the pizza (PREPARING, BAKING, READY) Status BakePizzaResponse_BakeStatus `protobuf:"varint,3,opt,name=status,proto3,enum=bakery.v1.BakePizzaResponse_BakeStatus" json:"status,omitempty"` // contains filtered or unexported fields }
Response to send, when Pizza is baking
func (*BakePizzaResponse) Descriptor
deprecated
func (*BakePizzaResponse) Descriptor() ([]byte, []int)
Deprecated: Use BakePizzaResponse.ProtoReflect.Descriptor instead.
func (*BakePizzaResponse) GetId ¶
func (x *BakePizzaResponse) GetId() string
func (*BakePizzaResponse) GetName ¶
func (x *BakePizzaResponse) GetName() string
func (*BakePizzaResponse) GetStatus ¶
func (x *BakePizzaResponse) GetStatus() BakePizzaResponse_BakeStatus
func (*BakePizzaResponse) ProtoMessage ¶
func (*BakePizzaResponse) ProtoMessage()
func (*BakePizzaResponse) ProtoReflect ¶
func (x *BakePizzaResponse) ProtoReflect() protoreflect.Message
func (*BakePizzaResponse) Reset ¶
func (x *BakePizzaResponse) Reset()
func (*BakePizzaResponse) String ¶
func (x *BakePizzaResponse) String() string
type BakePizzaResponse_BakeStatus ¶
type BakePizzaResponse_BakeStatus int32
const ( BakePizzaResponse_BAKE_STATUS_UNSPECIFIED BakePizzaResponse_BakeStatus = 0 BakePizzaResponse_BAKE_STATUS_PREPARING BakePizzaResponse_BakeStatus = 1 BakePizzaResponse_BAKE_STATUS_BAKING BakePizzaResponse_BakeStatus = 2 BakePizzaResponse_BAKE_STATUS_READY BakePizzaResponse_BakeStatus = 3 )
func (BakePizzaResponse_BakeStatus) Descriptor ¶
func (BakePizzaResponse_BakeStatus) Descriptor() protoreflect.EnumDescriptor
func (BakePizzaResponse_BakeStatus) Enum ¶
func (x BakePizzaResponse_BakeStatus) Enum() *BakePizzaResponse_BakeStatus
func (BakePizzaResponse_BakeStatus) EnumDescriptor
deprecated
func (BakePizzaResponse_BakeStatus) EnumDescriptor() ([]byte, []int)
Deprecated: Use BakePizzaResponse_BakeStatus.Descriptor instead.
func (BakePizzaResponse_BakeStatus) Number ¶
func (x BakePizzaResponse_BakeStatus) Number() protoreflect.EnumNumber
func (BakePizzaResponse_BakeStatus) String ¶
func (x BakePizzaResponse_BakeStatus) String() string
func (BakePizzaResponse_BakeStatus) Type ¶
func (BakePizzaResponse_BakeStatus) Type() protoreflect.EnumType
type BakeryServiceClient ¶
type BakeryServiceClient interface { // Needs a PizzaRequest and returns a stream of pizzas BakePizza(ctx context.Context, in *BakePizzaRequest, opts ...grpc.CallOption) (BakeryService_BakePizzaClient, error) }
BakeryServiceClient is the client API for BakeryService 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 NewBakeryServiceClient ¶
func NewBakeryServiceClient(cc grpc.ClientConnInterface) BakeryServiceClient
type BakeryServiceServer ¶
type BakeryServiceServer interface { // Needs a PizzaRequest and returns a stream of pizzas BakePizza(*BakePizzaRequest, BakeryService_BakePizzaServer) error }
BakeryServiceServer is the server API for BakeryService service. All implementations should embed UnimplementedBakeryServiceServer for forward compatibility
type BakeryService_BakePizzaClient ¶
type BakeryService_BakePizzaClient interface { Recv() (*BakePizzaResponse, error) grpc.ClientStream }
type BakeryService_BakePizzaServer ¶
type BakeryService_BakePizzaServer interface { Send(*BakePizzaResponse) error grpc.ServerStream }
type Toppings ¶
type Toppings struct { // id of the topping // represents the id of the topping in the whole system Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` // name of the topping Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
Toppings for the pizza
func (*Toppings) Descriptor
deprecated
func (*Toppings) ProtoMessage ¶
func (*Toppings) ProtoMessage()
func (*Toppings) ProtoReflect ¶
func (x *Toppings) ProtoReflect() protoreflect.Message
type UnimplementedBakeryServiceServer ¶
type UnimplementedBakeryServiceServer struct { }
UnimplementedBakeryServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedBakeryServiceServer) BakePizza ¶
func (UnimplementedBakeryServiceServer) BakePizza(*BakePizzaRequest, BakeryService_BakePizzaServer) error
type UnsafeBakeryServiceServer ¶
type UnsafeBakeryServiceServer interface {
// contains filtered or unexported methods
}
UnsafeBakeryServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to BakeryServiceServer will result in compilation errors.