Documentation
¶
Index ¶
- Constants
- Variables
- func RegisterCoffeeServiceServer(s grpc.ServiceRegistrar, srv CoffeeServiceServer)
- type BestCoffee
- func (*BestCoffee) Descriptor() ([]byte, []int)deprecated
- func (x *BestCoffee) GetDatabase() []*Option
- func (x *BestCoffee) GetDisclaimer() string
- func (x *BestCoffee) GetGemini() []*Option
- func (*BestCoffee) ProtoMessage()
- func (x *BestCoffee) ProtoReflect() protoreflect.Message
- func (x *BestCoffee) Reset()
- func (x *BestCoffee) String() string
- type Characteristic
- func (Characteristic) Descriptor() protoreflect.EnumDescriptor
- func (x Characteristic) Enum() *Characteristic
- func (Characteristic) EnumDescriptor() ([]byte, []int)deprecated
- func (x Characteristic) Number() protoreflect.EnumNumber
- func (x Characteristic) String() string
- func (Characteristic) Type() protoreflect.EnumType
- type CoffeeServiceClient
- type CoffeeServiceServer
- type Error
- type GetBestTypeCoffeeRequest
- func (*GetBestTypeCoffeeRequest) Descriptor() ([]byte, []int)deprecated
- func (x *GetBestTypeCoffeeRequest) GetCharacteristics() []Characteristic
- func (*GetBestTypeCoffeeRequest) ProtoMessage()
- func (x *GetBestTypeCoffeeRequest) ProtoReflect() protoreflect.Message
- func (x *GetBestTypeCoffeeRequest) Reset()
- func (x *GetBestTypeCoffeeRequest) String() string
- type GetBestTypeCoffeeResponse
- func (*GetBestTypeCoffeeResponse) Descriptor() ([]byte, []int)deprecated
- func (x *GetBestTypeCoffeeResponse) GetBestCoffee() *BestCoffee
- func (*GetBestTypeCoffeeResponse) ProtoMessage()
- func (x *GetBestTypeCoffeeResponse) ProtoReflect() protoreflect.Message
- func (x *GetBestTypeCoffeeResponse) Reset()
- func (x *GetBestTypeCoffeeResponse) String() string
- type Option
- type UnimplementedCoffeeServiceServer
- type UnsafeCoffeeServiceServer
Constants ¶
const (
CoffeeService_GetBestTypeCoffee_FullMethodName = "/coffee.CoffeeService/GetBestTypeCoffee"
)
Variables ¶
var ( Characteristic_name = map[int32]string{ 0: "ACIDITY", 1: "AFTERTASTE", 2: "AROMA", 3: "BODY", 4: "FLAVOR", 5: "SWEETNESS", } Characteristic_value = map[string]int32{ "ACIDITY": 0, "AFTERTASTE": 1, "AROMA": 2, "BODY": 3, "FLAVOR": 4, "SWEETNESS": 5, } )
Enum value maps for Characteristic.
var CoffeeService_ServiceDesc = grpc.ServiceDesc{ ServiceName: "coffee.CoffeeService", HandlerType: (*CoffeeServiceServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "GetBestTypeCoffee", Handler: _CoffeeService_GetBestTypeCoffee_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "api/coffee.proto", }
CoffeeService_ServiceDesc is the grpc.ServiceDesc for CoffeeService service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
var File_api_coffee_proto protoreflect.FileDescriptor
Functions ¶
func RegisterCoffeeServiceServer ¶
func RegisterCoffeeServiceServer(s grpc.ServiceRegistrar, srv CoffeeServiceServer)
Types ¶
type BestCoffee ¶
type BestCoffee struct {
Gemini []*Option `protobuf:"bytes,1,rep,name=gemini,proto3" json:"gemini,omitempty"`
Database []*Option `protobuf:"bytes,2,rep,name=database,proto3" json:"database,omitempty"`
Disclaimer string `protobuf:"bytes,3,opt,name=disclaimer,proto3" json:"disclaimer,omitempty"`
// contains filtered or unexported fields
}
func (*BestCoffee) Descriptor
deprecated
func (*BestCoffee) Descriptor() ([]byte, []int)
Deprecated: Use BestCoffee.ProtoReflect.Descriptor instead.
func (*BestCoffee) GetDatabase ¶
func (x *BestCoffee) GetDatabase() []*Option
func (*BestCoffee) GetDisclaimer ¶
func (x *BestCoffee) GetDisclaimer() string
func (*BestCoffee) GetGemini ¶
func (x *BestCoffee) GetGemini() []*Option
func (*BestCoffee) ProtoMessage ¶
func (*BestCoffee) ProtoMessage()
func (*BestCoffee) ProtoReflect ¶
func (x *BestCoffee) ProtoReflect() protoreflect.Message
func (*BestCoffee) Reset ¶
func (x *BestCoffee) Reset()
func (*BestCoffee) String ¶
func (x *BestCoffee) String() string
type Characteristic ¶
type Characteristic int32
const ( Characteristic_ACIDITY Characteristic = 0 Characteristic_AFTERTASTE Characteristic = 1 Characteristic_AROMA Characteristic = 2 Characteristic_BODY Characteristic = 3 Characteristic_FLAVOR Characteristic = 4 Characteristic_SWEETNESS Characteristic = 5 )
func (Characteristic) Descriptor ¶
func (Characteristic) Descriptor() protoreflect.EnumDescriptor
func (Characteristic) Enum ¶
func (x Characteristic) Enum() *Characteristic
func (Characteristic) EnumDescriptor
deprecated
func (Characteristic) EnumDescriptor() ([]byte, []int)
Deprecated: Use Characteristic.Descriptor instead.
func (Characteristic) Number ¶
func (x Characteristic) Number() protoreflect.EnumNumber
func (Characteristic) String ¶
func (x Characteristic) String() string
func (Characteristic) Type ¶
func (Characteristic) Type() protoreflect.EnumType
type CoffeeServiceClient ¶
type CoffeeServiceClient interface {
GetBestTypeCoffee(ctx context.Context, in *GetBestTypeCoffeeRequest, opts ...grpc.CallOption) (*GetBestTypeCoffeeResponse, error)
}
CoffeeServiceClient is the client API for CoffeeService 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.
CoffeeService defines the gRPC services for retrieving coffee data.
func NewCoffeeServiceClient ¶
func NewCoffeeServiceClient(cc grpc.ClientConnInterface) CoffeeServiceClient
type CoffeeServiceServer ¶
type CoffeeServiceServer interface {
GetBestTypeCoffee(context.Context, *GetBestTypeCoffeeRequest) (*GetBestTypeCoffeeResponse, error)
// contains filtered or unexported methods
}
CoffeeServiceServer is the server API for CoffeeService service. All implementations must embed UnimplementedCoffeeServiceServer for forward compatibility.
CoffeeService defines the gRPC services for retrieving coffee data.
type Error ¶
type Error struct {
Code int32 `protobuf:"varint,1,opt,name=code,proto3" json:"code,omitempty"`
Message string `protobuf:"bytes,2,opt,name=message,proto3" json:"message,omitempty"`
// contains filtered or unexported fields
}
func (*Error) Descriptor
deprecated
func (*Error) GetMessage ¶
func (*Error) ProtoMessage ¶
func (*Error) ProtoMessage()
func (*Error) ProtoReflect ¶
func (x *Error) ProtoReflect() protoreflect.Message
type GetBestTypeCoffeeRequest ¶
type GetBestTypeCoffeeRequest struct {
Characteristics []Characteristic `protobuf:"varint,1,rep,packed,name=characteristics,proto3,enum=coffee.Characteristic" json:"characteristics,omitempty"`
// contains filtered or unexported fields
}
func (*GetBestTypeCoffeeRequest) Descriptor
deprecated
func (*GetBestTypeCoffeeRequest) Descriptor() ([]byte, []int)
Deprecated: Use GetBestTypeCoffeeRequest.ProtoReflect.Descriptor instead.
func (*GetBestTypeCoffeeRequest) GetCharacteristics ¶
func (x *GetBestTypeCoffeeRequest) GetCharacteristics() []Characteristic
func (*GetBestTypeCoffeeRequest) ProtoMessage ¶
func (*GetBestTypeCoffeeRequest) ProtoMessage()
func (*GetBestTypeCoffeeRequest) ProtoReflect ¶
func (x *GetBestTypeCoffeeRequest) ProtoReflect() protoreflect.Message
func (*GetBestTypeCoffeeRequest) Reset ¶
func (x *GetBestTypeCoffeeRequest) Reset()
func (*GetBestTypeCoffeeRequest) String ¶
func (x *GetBestTypeCoffeeRequest) String() string
type GetBestTypeCoffeeResponse ¶
type GetBestTypeCoffeeResponse struct {
BestCoffee *BestCoffee `protobuf:"bytes,1,opt,name=best_coffee,json=bestCoffee,proto3" json:"best_coffee,omitempty"`
// contains filtered or unexported fields
}
func (*GetBestTypeCoffeeResponse) Descriptor
deprecated
func (*GetBestTypeCoffeeResponse) Descriptor() ([]byte, []int)
Deprecated: Use GetBestTypeCoffeeResponse.ProtoReflect.Descriptor instead.
func (*GetBestTypeCoffeeResponse) GetBestCoffee ¶
func (x *GetBestTypeCoffeeResponse) GetBestCoffee() *BestCoffee
func (*GetBestTypeCoffeeResponse) ProtoMessage ¶
func (*GetBestTypeCoffeeResponse) ProtoMessage()
func (*GetBestTypeCoffeeResponse) ProtoReflect ¶
func (x *GetBestTypeCoffeeResponse) ProtoReflect() protoreflect.Message
func (*GetBestTypeCoffeeResponse) Reset ¶
func (x *GetBestTypeCoffeeResponse) Reset()
func (*GetBestTypeCoffeeResponse) String ¶
func (x *GetBestTypeCoffeeResponse) String() string
type Option ¶
type Option struct {
Message string `protobuf:"bytes,1,opt,name=message,proto3" json:"message,omitempty"`
Details map[string]string `` /* 155-byte string literal not displayed */
// contains filtered or unexported fields
}
func (*Option) Descriptor
deprecated
func (*Option) GetDetails ¶
func (*Option) GetMessage ¶
func (*Option) ProtoMessage ¶
func (*Option) ProtoMessage()
func (*Option) ProtoReflect ¶
func (x *Option) ProtoReflect() protoreflect.Message
type UnimplementedCoffeeServiceServer ¶
type UnimplementedCoffeeServiceServer struct{}
UnimplementedCoffeeServiceServer must be embedded to have forward compatible implementations.
NOTE: this should be embedded by value instead of pointer to avoid a nil pointer dereference when methods are called.
func (UnimplementedCoffeeServiceServer) GetBestTypeCoffee ¶
func (UnimplementedCoffeeServiceServer) GetBestTypeCoffee(context.Context, *GetBestTypeCoffeeRequest) (*GetBestTypeCoffeeResponse, error)
type UnsafeCoffeeServiceServer ¶
type UnsafeCoffeeServiceServer interface {
// contains filtered or unexported methods
}
UnsafeCoffeeServiceServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to CoffeeServiceServer will result in compilation errors.