recipe_grpc

package
v0.0.0-...-294af13 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_src_handlers_recipe_grpc_recipe_proto protoreflect.FileDescriptor
View Source
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) Descriptor() ([]byte, []int)

Deprecated: Use Recipe.ProtoReflect.Descriptor instead.

func (*Recipe) GetDescription

func (x *Recipe) GetDescription() string

func (*Recipe) GetIngredients

func (x *Recipe) GetIngredients() []*Ingredient

func (*Recipe) GetInstructions

func (x *Recipe) GetInstructions() []string

func (*Recipe) GetName

func (x *Recipe) GetName() string

func (*Recipe) GetPersons

func (x *Recipe) GetPersons() int32

func (*Recipe) ProtoMessage

func (*Recipe) ProtoMessage()

func (*Recipe) ProtoReflect

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

func (*Recipe) Reset

func (x *Recipe) Reset()

func (*Recipe) String

func (x *Recipe) String() string

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.

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

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.

Jump to

Keyboard shortcuts

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