Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var File_gotesting_api_v1_api_proto protoreflect.FileDescriptor
var RecipeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "gotesting.api.v1.RecipeService", HandlerType: (*RecipeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Search", Handler: _RecipeService_Search_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "gotesting/api/v1/api.proto", }
RecipeService_ServiceDesc is the grpc.ServiceDesc for RecipeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterRecipeServiceServer ¶
func RegisterRecipeServiceServer(s grpc.ServiceRegistrar, srv RecipeServiceServer)
Types ¶
type Recipe ¶
type Recipe struct { Uri string `protobuf:"bytes,1,opt,name=uri,proto3" json:"uri,omitempty"` Label string `protobuf:"bytes,2,opt,name=label,proto3" json:"label,omitempty"` Image string `protobuf:"bytes,3,opt,name=image,proto3" json:"image,omitempty"` // contains filtered or unexported fields }
func (*Recipe) Descriptor
deprecated
func (*Recipe) ProtoMessage ¶
func (*Recipe) ProtoMessage()
func (*Recipe) ProtoReflect ¶
func (x *Recipe) ProtoReflect() protoreflect.Message
type RecipeServiceClient ¶
type RecipeServiceClient interface {
Search(ctx context.Context, in *SearchRequest, opts ...grpc.CallOption) (*SearchResponse, error)
}
RecipeServiceClient is the client API for RecipeService 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 NewRecipeServiceClient ¶
func NewRecipeServiceClient(cc grpc.ClientConnInterface) RecipeServiceClient
type RecipeServiceServer ¶
type RecipeServiceServer interface {
Search(context.Context, *SearchRequest) (*SearchResponse, error)
}
RecipeServiceServer is the server API for RecipeService service. All implementations should embed UnimplementedRecipeServiceServer for forward compatibility
type SearchRequest ¶
type SearchRequest struct { Query string `protobuf:"bytes,1,opt,name=query,proto3" json:"query,omitempty"` // contains filtered or unexported fields }
func (*SearchRequest) Descriptor
deprecated
func (*SearchRequest) Descriptor() ([]byte, []int)
Deprecated: Use SearchRequest.ProtoReflect.Descriptor instead.
func (*SearchRequest) GetQuery ¶
func (x *SearchRequest) GetQuery() string
func (*SearchRequest) ProtoMessage ¶
func (*SearchRequest) ProtoMessage()
func (*SearchRequest) ProtoReflect ¶
func (x *SearchRequest) ProtoReflect() protoreflect.Message
func (*SearchRequest) Reset ¶
func (x *SearchRequest) Reset()
func (*SearchRequest) String ¶
func (x *SearchRequest) String() string
type SearchResponse ¶
type SearchResponse struct { Recipes []*Recipe `protobuf:"bytes,1,rep,name=recipes,proto3" json:"recipes,omitempty"` // contains filtered or unexported fields }
func (*SearchResponse) Descriptor
deprecated
func (*SearchResponse) Descriptor() ([]byte, []int)
Deprecated: Use SearchResponse.ProtoReflect.Descriptor instead.
func (*SearchResponse) GetRecipes ¶
func (x *SearchResponse) GetRecipes() []*Recipe
func (*SearchResponse) ProtoMessage ¶
func (*SearchResponse) ProtoMessage()
func (*SearchResponse) ProtoReflect ¶
func (x *SearchResponse) ProtoReflect() protoreflect.Message
func (*SearchResponse) Reset ¶
func (x *SearchResponse) Reset()
func (*SearchResponse) String ¶
func (x *SearchResponse) String() string
type UnimplementedRecipeServiceServer ¶
type UnimplementedRecipeServiceServer struct { }
UnimplementedRecipeServiceServer should be embedded to have forward compatible implementations.
func (UnimplementedRecipeServiceServer) Search ¶
func (UnimplementedRecipeServiceServer) Search(context.Context, *SearchRequest) (*SearchResponse, error)
type UnsafeRecipeServiceServer ¶
type UnsafeRecipeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeRecipeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to RecipeServiceServer will result in compilation errors.