bakery

package
v0.0.0-...-abb0a12 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2021 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
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.

View Source
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)

View Source
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 (*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) Enum

func (BakePizzaResponse_BakeStatus) EnumDescriptor deprecated

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

Deprecated: Use BakePizzaResponse_BakeStatus.Descriptor instead.

func (BakePizzaResponse_BakeStatus) Number

func (BakePizzaResponse_BakeStatus) String

func (BakePizzaResponse_BakeStatus) Type

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.

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) Descriptor() ([]byte, []int)

Deprecated: Use Toppings.ProtoReflect.Descriptor instead.

func (*Toppings) GetId

func (x *Toppings) GetId() string

func (*Toppings) GetName

func (x *Toppings) GetName() string

func (*Toppings) ProtoMessage

func (*Toppings) ProtoMessage()

func (*Toppings) ProtoReflect

func (x *Toppings) ProtoReflect() protoreflect.Message

func (*Toppings) Reset

func (x *Toppings) Reset()

func (*Toppings) String

func (x *Toppings) String() string

type UnimplementedBakeryServiceServer

type UnimplementedBakeryServiceServer struct {
}

UnimplementedBakeryServiceServer should be embedded to have forward compatible implementations.

func (UnimplementedBakeryServiceServer) BakePizza

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.

Jump to

Keyboard shortcuts

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