generated

package
v0.0.0-...-29136bc Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2020 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package generated is a reverse proxy.

It translates gRPC into RESTful JSON APIs.

Index

Constants

This section is empty.

Variables

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

func (*GetIngredientsForAllRecipesRequest) ProtoMessage()

func (*GetIngredientsForAllRecipesRequest) ProtoReflect

func (*GetIngredientsForAllRecipesRequest) Reset

func (*GetIngredientsForAllRecipesRequest) 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 (*GetIngredientsForAllRecipesResponse) Reset

func (*GetIngredientsForAllRecipesResponse) 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 (*ListAllIngredientsAtHomeRequest) Reset

func (*ListAllIngredientsAtHomeRequest) 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 (*ListAllIngredientsAtHomeResponse) Reset

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

Deprecated: Use Recipe.ProtoReflect.Descriptor instead.

func (*Recipe) GetCuisine

func (x *Recipe) GetCuisine() string

func (*Recipe) GetName

func (x *Recipe) GetName() string

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

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) GetIngredientsForAllRecipes

func (*UnimplementedRecipesServiceServer) ListAllIngredientsAtHome

func (*UnimplementedRecipesServiceServer) ListAllRecipes

Jump to

Keyboard shortcuts

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