Documentation ¶
Index ¶
- Variables
- func RegisterRecipeHandlerServer(s grpc.ServiceRegistrar, srv RecipeHandlerServer)
- type Ingredient
- func (*Ingredient) Descriptor() ([]byte, []int)deprecated
- func (x *Ingredient) GetAmount() float64
- func (x *Ingredient) GetName() string
- func (x *Ingredient) GetUnit() string
- func (*Ingredient) ProtoMessage()
- func (x *Ingredient) ProtoReflect() protoreflect.Message
- func (x *Ingredient) Reset()
- func (x *Ingredient) String() string
- type Recipe
- func (*Recipe) Descriptor() ([]byte, []int)deprecated
- func (x *Recipe) GetDescription() string
- func (x *Recipe) GetIngredients() []*Ingredient
- func (x *Recipe) GetInstructions() []string
- func (x *Recipe) GetName() string
- func (x *Recipe) GetPersons() int32
- func (*Recipe) ProtoMessage()
- func (x *Recipe) ProtoReflect() protoreflect.Message
- func (x *Recipe) Reset()
- func (x *Recipe) String() string
- type RecipeHandlerClient
- type RecipeHandlerServer
- type RecipeRequest
- type UnimplementedRecipeHandlerServer
- type UnsafeRecipeHandlerServer
Constants ¶
This section is empty.
Variables ¶
var File_src_handlers_recipe_grpc_recipe_proto protoreflect.FileDescriptor
var RecipeHandler_ServiceDesc = grpc.ServiceDesc{ ServiceName: "RecipeHandler", HandlerType: (*RecipeHandlerServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetRecipe", Handler: _RecipeHandler_GetRecipe_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "src/handlers/recipe_grpc/recipe.proto", }
RecipeHandler_ServiceDesc is the grpc.ServiceDesc for RecipeHandler service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRecipeHandlerServer ¶
func RegisterRecipeHandlerServer(s grpc.ServiceRegistrar, srv RecipeHandlerServer)
Types ¶
type Ingredient ¶
type Ingredient struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Amount float64 `protobuf:"fixed64,2,opt,name=amount,proto3" json:"amount,omitempty"` Unit string `protobuf:"bytes,3,opt,name=unit,proto3" json:"unit,omitempty"` // contains filtered or unexported fields }
func (*Ingredient) Descriptor
deprecated
func (*Ingredient) Descriptor() ([]byte, []int)
Deprecated: Use Ingredient.ProtoReflect.Descriptor instead.
func (*Ingredient) GetAmount ¶
func (x *Ingredient) GetAmount() float64
func (*Ingredient) GetName ¶
func (x *Ingredient) GetName() string
func (*Ingredient) GetUnit ¶
func (x *Ingredient) GetUnit() string
func (*Ingredient) ProtoMessage ¶
func (*Ingredient) ProtoMessage()
func (*Ingredient) ProtoReflect ¶
func (x *Ingredient) ProtoReflect() protoreflect.Message
func (*Ingredient) Reset ¶
func (x *Ingredient) Reset()
func (*Ingredient) String ¶
func (x *Ingredient) String() string
type Recipe ¶
type Recipe struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Description string `protobuf:"bytes,2,opt,name=description,proto3" json:"description,omitempty"` Persons int32 `protobuf:"varint,3,opt,name=persons,proto3" json:"persons,omitempty"` Ingredients []*Ingredient `protobuf:"bytes,4,rep,name=ingredients,proto3" json:"ingredients,omitempty"` Instructions []string `protobuf:"bytes,5,rep,name=instructions,proto3" json:"instructions,omitempty"` // contains filtered or unexported fields }
func (*Recipe) Descriptor
deprecated
func (*Recipe) GetDescription ¶
func (*Recipe) GetIngredients ¶
func (x *Recipe) GetIngredients() []*Ingredient
func (*Recipe) GetInstructions ¶
func (*Recipe) GetPersons ¶
func (*Recipe) ProtoMessage ¶
func (*Recipe) ProtoMessage()
func (*Recipe) ProtoReflect ¶
func (x *Recipe) ProtoReflect() protoreflect.Message
type RecipeHandlerClient ¶
type RecipeHandlerClient interface {
GetRecipe(ctx context.Context, in *RecipeRequest, opts ...grpc.CallOption) (*Recipe, error)
}
RecipeHandlerClient is the client API for RecipeHandler 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 NewRecipeHandlerClient ¶
func NewRecipeHandlerClient(cc grpc.ClientConnInterface) RecipeHandlerClient
type RecipeHandlerServer ¶
type RecipeHandlerServer interface { GetRecipe(context.Context, *RecipeRequest) (*Recipe, error) // contains filtered or unexported methods }
RecipeHandlerServer is the server API for RecipeHandler service. All implementations must embed UnimplementedRecipeHandlerServer for forward compatibility
type RecipeRequest ¶
type RecipeRequest struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // contains filtered or unexported fields }
func (*RecipeRequest) Descriptor
deprecated
func (*RecipeRequest) Descriptor() ([]byte, []int)
Deprecated: Use RecipeRequest.ProtoReflect.Descriptor instead.
func (*RecipeRequest) GetName ¶
func (x *RecipeRequest) GetName() string
func (*RecipeRequest) ProtoMessage ¶
func (*RecipeRequest) ProtoMessage()
func (*RecipeRequest) ProtoReflect ¶
func (x *RecipeRequest) ProtoReflect() protoreflect.Message
func (*RecipeRequest) Reset ¶
func (x *RecipeRequest) Reset()
func (*RecipeRequest) String ¶
func (x *RecipeRequest) String() string
type UnimplementedRecipeHandlerServer ¶
type UnimplementedRecipeHandlerServer struct { }
UnimplementedRecipeHandlerServer must be embedded to have forward compatible implementations.
func (UnimplementedRecipeHandlerServer) GetRecipe ¶
func (UnimplementedRecipeHandlerServer) GetRecipe(context.Context, *RecipeRequest) (*Recipe, error)
type UnsafeRecipeHandlerServer ¶
type UnsafeRecipeHandlerServer interface {
// contains filtered or unexported methods
}
UnsafeRecipeHandlerServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RecipeHandlerServer will result in compilation errors.