Documentation ¶
Overview ¶
Package generated is a reverse proxy.
It translates gRPC into RESTful JSON APIs.
Index ¶
- Variables
- func RegisterRecipesServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
- func RegisterRecipesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RecipesServiceClient) error
- func RegisterRecipesServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, ...) (err error)
- func RegisterRecipesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RecipesServiceServer) error
- func RegisterRecipesServiceServer(s *grpc.Server, srv RecipesServiceServer)
- type AddRecipeRequest
- type AddRecipeResponse
- type GetIngredientsForAllRecipesRequest
- func (*GetIngredientsForAllRecipesRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetIngredientsForAllRecipesRequest) GetRecipe() *Recipe
- func (*GetIngredientsForAllRecipesRequest) ProtoMessage()
- func (x *GetIngredientsForAllRecipesRequest) ProtoReflect() protoreflect.Message
- func (x *GetIngredientsForAllRecipesRequest) Reset()
- func (x *GetIngredientsForAllRecipesRequest) String() string
- type GetIngredientsForAllRecipesResponse
- func (*GetIngredientsForAllRecipesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetIngredientsForAllRecipesResponse) GetIngredient() *Ingredient
- func (*GetIngredientsForAllRecipesResponse) ProtoMessage()
- func (x *GetIngredientsForAllRecipesResponse) ProtoReflect() protoreflect.Message
- func (x *GetIngredientsForAllRecipesResponse) Reset()
- func (x *GetIngredientsForAllRecipesResponse) String() string
- type Ingredient
- type ListAllIngredientsAtHomeRequest
- func (*ListAllIngredientsAtHomeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *ListAllIngredientsAtHomeRequest) GetIngredient() *Ingredient
- func (*ListAllIngredientsAtHomeRequest) ProtoMessage()
- func (x *ListAllIngredientsAtHomeRequest) ProtoReflect() protoreflect.Message
- func (x *ListAllIngredientsAtHomeRequest) Reset()
- func (x *ListAllIngredientsAtHomeRequest) String() string
- type ListAllIngredientsAtHomeResponse
- func (*ListAllIngredientsAtHomeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListAllIngredientsAtHomeResponse) GetSuccess() bool
- func (*ListAllIngredientsAtHomeResponse) ProtoMessage()
- func (x *ListAllIngredientsAtHomeResponse) ProtoReflect() protoreflect.Message
- func (x *ListAllIngredientsAtHomeResponse) Reset()
- func (x *ListAllIngredientsAtHomeResponse) String() string
- type ListAllRecipesRequest
- type ListAllRecipesResponse
- func (*ListAllRecipesResponse) Descriptor() ([]byte, []int)deprecated
- func (x *ListAllRecipesResponse) GetRecipe() *Recipe
- func (*ListAllRecipesResponse) ProtoMessage()
- func (x *ListAllRecipesResponse) ProtoReflect() protoreflect.Message
- func (x *ListAllRecipesResponse) Reset()
- func (x *ListAllRecipesResponse) String() string
- type Recipe
- type RecipesServiceClient
- type RecipesServiceServer
- type RecipesService_GetIngredientsForAllRecipesClient
- type RecipesService_GetIngredientsForAllRecipesServer
- type RecipesService_ListAllIngredientsAtHomeClient
- type RecipesService_ListAllIngredientsAtHomeServer
- type RecipesService_ListAllRecipesClient
- type RecipesService_ListAllRecipesServer
- type UnimplementedRecipesServiceServer
- func (*UnimplementedRecipesServiceServer) AddRecipe(context.Context, *AddRecipeRequest) (*AddRecipeResponse, error)
- func (*UnimplementedRecipesServiceServer) GetIngredientsForAllRecipes(RecipesService_GetIngredientsForAllRecipesServer) error
- func (*UnimplementedRecipesServiceServer) ListAllIngredientsAtHome(RecipesService_ListAllIngredientsAtHomeServer) error
- func (*UnimplementedRecipesServiceServer) ListAllRecipes(*ListAllRecipesRequest, RecipesService_ListAllRecipesServer) error
Constants ¶
This section is empty.
Variables ¶
var File_recipes_service_proto protoreflect.FileDescriptor
Functions ¶
func RegisterRecipesServiceHandler ¶
func RegisterRecipesServiceHandler(ctx context.Context, mux *runtime.ServeMux, conn *grpc.ClientConn) error
RegisterRecipesServiceHandler registers the http handlers for service RecipesService to "mux". The handlers forward requests to the grpc endpoint over "conn".
func RegisterRecipesServiceHandlerClient ¶
func RegisterRecipesServiceHandlerClient(ctx context.Context, mux *runtime.ServeMux, client RecipesServiceClient) error
RegisterRecipesServiceHandlerClient registers the http handlers for service RecipesService to "mux". The handlers forward requests to the grpc endpoint over the given implementation of "RecipesServiceClient". Note: the gRPC framework executes interceptors within the gRPC handler. If the passed in "RecipesServiceClient" doesn't go through the normal gRPC flow (creating a gRPC client etc.) then it will be up to the passed in "RecipesServiceClient" to call the correct interceptors.
func RegisterRecipesServiceHandlerFromEndpoint ¶
func RegisterRecipesServiceHandlerFromEndpoint(ctx context.Context, mux *runtime.ServeMux, endpoint string, opts []grpc.DialOption) (err error)
RegisterRecipesServiceHandlerFromEndpoint is same as RegisterRecipesServiceHandler but automatically dials to "endpoint" and closes the connection when "ctx" gets done.
func RegisterRecipesServiceHandlerServer ¶
func RegisterRecipesServiceHandlerServer(ctx context.Context, mux *runtime.ServeMux, server RecipesServiceServer) error
RegisterRecipesServiceHandlerServer registers the http handlers for service RecipesService to "mux". UnaryRPC :call RecipesServiceServer directly. StreamingRPC :currently unsupported pending https://github.com/grpc/grpc-go/issues/906.
func RegisterRecipesServiceServer ¶
func RegisterRecipesServiceServer(s *grpc.Server, srv RecipesServiceServer)
Types ¶
type AddRecipeRequest ¶
type AddRecipeRequest struct { Recipe *Recipe `protobuf:"bytes,1,opt,name=recipe,proto3" json:"recipe,omitempty"` // contains filtered or unexported fields }
func (*AddRecipeRequest) Descriptor
deprecated
func (*AddRecipeRequest) Descriptor() ([]byte, []int)
Deprecated: Use AddRecipeRequest.ProtoReflect.Descriptor instead.
func (*AddRecipeRequest) GetRecipe ¶
func (x *AddRecipeRequest) GetRecipe() *Recipe
func (*AddRecipeRequest) ProtoMessage ¶
func (*AddRecipeRequest) ProtoMessage()
func (*AddRecipeRequest) ProtoReflect ¶
func (x *AddRecipeRequest) ProtoReflect() protoreflect.Message
func (*AddRecipeRequest) Reset ¶
func (x *AddRecipeRequest) Reset()
func (*AddRecipeRequest) String ¶
func (x *AddRecipeRequest) String() string
type AddRecipeResponse ¶
type AddRecipeResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*AddRecipeResponse) Descriptor
deprecated
func (*AddRecipeResponse) Descriptor() ([]byte, []int)
Deprecated: Use AddRecipeResponse.ProtoReflect.Descriptor instead.
func (*AddRecipeResponse) GetSuccess ¶
func (x *AddRecipeResponse) GetSuccess() bool
func (*AddRecipeResponse) ProtoMessage ¶
func (*AddRecipeResponse) ProtoMessage()
func (*AddRecipeResponse) ProtoReflect ¶
func (x *AddRecipeResponse) ProtoReflect() protoreflect.Message
func (*AddRecipeResponse) Reset ¶
func (x *AddRecipeResponse) Reset()
func (*AddRecipeResponse) String ¶
func (x *AddRecipeResponse) String() string
type GetIngredientsForAllRecipesRequest ¶
type GetIngredientsForAllRecipesRequest struct { Recipe *Recipe `protobuf:"bytes,1,opt,name=recipe,proto3" json:"recipe,omitempty"` // contains filtered or unexported fields }
func (*GetIngredientsForAllRecipesRequest) Descriptor
deprecated
func (*GetIngredientsForAllRecipesRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetIngredientsForAllRecipesRequest.ProtoReflect.Descriptor instead.
func (*GetIngredientsForAllRecipesRequest) GetRecipe ¶
func (x *GetIngredientsForAllRecipesRequest) GetRecipe() *Recipe
func (*GetIngredientsForAllRecipesRequest) ProtoMessage ¶
func (*GetIngredientsForAllRecipesRequest) ProtoMessage()
func (*GetIngredientsForAllRecipesRequest) ProtoReflect ¶
func (x *GetIngredientsForAllRecipesRequest) ProtoReflect() protoreflect.Message
func (*GetIngredientsForAllRecipesRequest) Reset ¶
func (x *GetIngredientsForAllRecipesRequest) Reset()
func (*GetIngredientsForAllRecipesRequest) String ¶
func (x *GetIngredientsForAllRecipesRequest) String() string
type GetIngredientsForAllRecipesResponse ¶
type GetIngredientsForAllRecipesResponse struct { Ingredient *Ingredient `protobuf:"bytes,1,opt,name=ingredient,proto3" json:"ingredient,omitempty"` // contains filtered or unexported fields }
func (*GetIngredientsForAllRecipesResponse) Descriptor
deprecated
func (*GetIngredientsForAllRecipesResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetIngredientsForAllRecipesResponse.ProtoReflect.Descriptor instead.
func (*GetIngredientsForAllRecipesResponse) GetIngredient ¶
func (x *GetIngredientsForAllRecipesResponse) GetIngredient() *Ingredient
func (*GetIngredientsForAllRecipesResponse) ProtoMessage ¶
func (*GetIngredientsForAllRecipesResponse) ProtoMessage()
func (*GetIngredientsForAllRecipesResponse) ProtoReflect ¶
func (x *GetIngredientsForAllRecipesResponse) ProtoReflect() protoreflect.Message
func (*GetIngredientsForAllRecipesResponse) Reset ¶
func (x *GetIngredientsForAllRecipesResponse) Reset()
func (*GetIngredientsForAllRecipesResponse) String ¶
func (x *GetIngredientsForAllRecipesResponse) String() string
type Ingredient ¶
type Ingredient struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Quantity string `protobuf:"bytes,2,opt,name=quantity,proto3" json:"quantity,omitempty"` // contains filtered or unexported fields }
func (*Ingredient) Descriptor
deprecated
func (*Ingredient) Descriptor() ([]byte, []int)
Deprecated: Use Ingredient.ProtoReflect.Descriptor instead.
func (*Ingredient) GetName ¶
func (x *Ingredient) GetName() string
func (*Ingredient) GetQuantity ¶
func (x *Ingredient) GetQuantity() 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 ListAllIngredientsAtHomeRequest ¶
type ListAllIngredientsAtHomeRequest struct { Ingredient *Ingredient `protobuf:"bytes,1,opt,name=ingredient,proto3" json:"ingredient,omitempty"` // contains filtered or unexported fields }
func (*ListAllIngredientsAtHomeRequest) Descriptor
deprecated
func (*ListAllIngredientsAtHomeRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListAllIngredientsAtHomeRequest.ProtoReflect.Descriptor instead.
func (*ListAllIngredientsAtHomeRequest) GetIngredient ¶
func (x *ListAllIngredientsAtHomeRequest) GetIngredient() *Ingredient
func (*ListAllIngredientsAtHomeRequest) ProtoMessage ¶
func (*ListAllIngredientsAtHomeRequest) ProtoMessage()
func (*ListAllIngredientsAtHomeRequest) ProtoReflect ¶
func (x *ListAllIngredientsAtHomeRequest) ProtoReflect() protoreflect.Message
func (*ListAllIngredientsAtHomeRequest) Reset ¶
func (x *ListAllIngredientsAtHomeRequest) Reset()
func (*ListAllIngredientsAtHomeRequest) String ¶
func (x *ListAllIngredientsAtHomeRequest) String() string
type ListAllIngredientsAtHomeResponse ¶
type ListAllIngredientsAtHomeResponse struct { Success bool `protobuf:"varint,1,opt,name=success,proto3" json:"success,omitempty"` // contains filtered or unexported fields }
func (*ListAllIngredientsAtHomeResponse) Descriptor
deprecated
func (*ListAllIngredientsAtHomeResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListAllIngredientsAtHomeResponse.ProtoReflect.Descriptor instead.
func (*ListAllIngredientsAtHomeResponse) GetSuccess ¶
func (x *ListAllIngredientsAtHomeResponse) GetSuccess() bool
func (*ListAllIngredientsAtHomeResponse) ProtoMessage ¶
func (*ListAllIngredientsAtHomeResponse) ProtoMessage()
func (*ListAllIngredientsAtHomeResponse) ProtoReflect ¶
func (x *ListAllIngredientsAtHomeResponse) ProtoReflect() protoreflect.Message
func (*ListAllIngredientsAtHomeResponse) Reset ¶
func (x *ListAllIngredientsAtHomeResponse) Reset()
func (*ListAllIngredientsAtHomeResponse) String ¶
func (x *ListAllIngredientsAtHomeResponse) String() string
type ListAllRecipesRequest ¶
type ListAllRecipesRequest struct {
// contains filtered or unexported fields
}
func (*ListAllRecipesRequest) Descriptor
deprecated
func (*ListAllRecipesRequest) Descriptor() ([]byte, []int)
Deprecated: Use ListAllRecipesRequest.ProtoReflect.Descriptor instead.
func (*ListAllRecipesRequest) ProtoMessage ¶
func (*ListAllRecipesRequest) ProtoMessage()
func (*ListAllRecipesRequest) ProtoReflect ¶
func (x *ListAllRecipesRequest) ProtoReflect() protoreflect.Message
func (*ListAllRecipesRequest) Reset ¶
func (x *ListAllRecipesRequest) Reset()
func (*ListAllRecipesRequest) String ¶
func (x *ListAllRecipesRequest) String() string
type ListAllRecipesResponse ¶
type ListAllRecipesResponse struct { Recipe *Recipe `protobuf:"bytes,1,opt,name=recipe,proto3" json:"recipe,omitempty"` // contains filtered or unexported fields }
func (*ListAllRecipesResponse) Descriptor
deprecated
func (*ListAllRecipesResponse) Descriptor() ([]byte, []int)
Deprecated: Use ListAllRecipesResponse.ProtoReflect.Descriptor instead.
func (*ListAllRecipesResponse) GetRecipe ¶
func (x *ListAllRecipesResponse) GetRecipe() *Recipe
func (*ListAllRecipesResponse) ProtoMessage ¶
func (*ListAllRecipesResponse) ProtoMessage()
func (*ListAllRecipesResponse) ProtoReflect ¶
func (x *ListAllRecipesResponse) ProtoReflect() protoreflect.Message
func (*ListAllRecipesResponse) Reset ¶
func (x *ListAllRecipesResponse) Reset()
func (*ListAllRecipesResponse) String ¶
func (x *ListAllRecipesResponse) String() string
type Recipe ¶
type Recipe struct { Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` Cuisine string `protobuf:"bytes,2,opt,name=cuisine,proto3" json:"cuisine,omitempty"` // contains filtered or unexported fields }
func (*Recipe) Descriptor
deprecated
func (*Recipe) GetCuisine ¶
func (*Recipe) ProtoMessage ¶
func (*Recipe) ProtoMessage()
func (*Recipe) ProtoReflect ¶
func (x *Recipe) ProtoReflect() protoreflect.Message
type RecipesServiceClient ¶
type RecipesServiceClient interface { // unary AddRecipe(ctx context.Context, in *AddRecipeRequest, opts ...grpc.CallOption) (*AddRecipeResponse, error) // server-streaming ListAllRecipes(ctx context.Context, in *ListAllRecipesRequest, opts ...grpc.CallOption) (RecipesService_ListAllRecipesClient, error) // client-streaming ListAllIngredientsAtHome(ctx context.Context, opts ...grpc.CallOption) (RecipesService_ListAllIngredientsAtHomeClient, error) // Bidirectional-streaming GetIngredientsForAllRecipes(ctx context.Context, opts ...grpc.CallOption) (RecipesService_GetIngredientsForAllRecipesClient, error) }
RecipesServiceClient is the client API for RecipesService service.
For semantics around ctx use and closing/ending streaming RPCs, please refer to https://godoc.org/google.golang.org/grpc#ClientConn.NewStream.
func NewRecipesServiceClient ¶
func NewRecipesServiceClient(cc grpc.ClientConnInterface) RecipesServiceClient
type RecipesServiceServer ¶
type RecipesServiceServer interface { // unary AddRecipe(context.Context, *AddRecipeRequest) (*AddRecipeResponse, error) // server-streaming ListAllRecipes(*ListAllRecipesRequest, RecipesService_ListAllRecipesServer) error // client-streaming ListAllIngredientsAtHome(RecipesService_ListAllIngredientsAtHomeServer) error // Bidirectional-streaming GetIngredientsForAllRecipes(RecipesService_GetIngredientsForAllRecipesServer) error }
RecipesServiceServer is the server API for RecipesService service.
type RecipesService_GetIngredientsForAllRecipesClient ¶
type RecipesService_GetIngredientsForAllRecipesClient interface { Send(*GetIngredientsForAllRecipesRequest) error Recv() (*GetIngredientsForAllRecipesResponse, error) grpc.ClientStream }
type RecipesService_GetIngredientsForAllRecipesServer ¶
type RecipesService_GetIngredientsForAllRecipesServer interface { Send(*GetIngredientsForAllRecipesResponse) error Recv() (*GetIngredientsForAllRecipesRequest, error) grpc.ServerStream }
type RecipesService_ListAllIngredientsAtHomeClient ¶
type RecipesService_ListAllIngredientsAtHomeClient interface { Send(*ListAllIngredientsAtHomeRequest) error CloseAndRecv() (*ListAllIngredientsAtHomeResponse, error) grpc.ClientStream }
type RecipesService_ListAllIngredientsAtHomeServer ¶
type RecipesService_ListAllIngredientsAtHomeServer interface { SendAndClose(*ListAllIngredientsAtHomeResponse) error Recv() (*ListAllIngredientsAtHomeRequest, error) grpc.ServerStream }
type RecipesService_ListAllRecipesClient ¶
type RecipesService_ListAllRecipesClient interface { Recv() (*ListAllRecipesResponse, error) grpc.ClientStream }
type RecipesService_ListAllRecipesServer ¶
type RecipesService_ListAllRecipesServer interface { Send(*ListAllRecipesResponse) error grpc.ServerStream }
type UnimplementedRecipesServiceServer ¶
type UnimplementedRecipesServiceServer struct { }
UnimplementedRecipesServiceServer can be embedded to have forward compatible implementations.
func (*UnimplementedRecipesServiceServer) AddRecipe ¶
func (*UnimplementedRecipesServiceServer) AddRecipe(context.Context, *AddRecipeRequest) (*AddRecipeResponse, error)
func (*UnimplementedRecipesServiceServer) GetIngredientsForAllRecipes ¶
func (*UnimplementedRecipesServiceServer) GetIngredientsForAllRecipes(RecipesService_GetIngredientsForAllRecipesServer) error
func (*UnimplementedRecipesServiceServer) ListAllIngredientsAtHome ¶
func (*UnimplementedRecipesServiceServer) ListAllIngredientsAtHome(RecipesService_ListAllIngredientsAtHomeServer) error
func (*UnimplementedRecipesServiceServer) ListAllRecipes ¶
func (*UnimplementedRecipesServiceServer) ListAllRecipes(*ListAllRecipesRequest, RecipesService_ListAllRecipesServer) error