coffee

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2024 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

View Source
const (
	CoffeeService_GetBestTypeCoffee_FullMethodName = "/coffee.CoffeeService/GetBestTypeCoffee"
)

Variables

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

View Source
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)

View Source
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) Enum

func (x Characteristic) Enum() *Characteristic

func (Characteristic) EnumDescriptor deprecated

func (Characteristic) EnumDescriptor() ([]byte, []int)

Deprecated: Use Characteristic.Descriptor instead.

func (Characteristic) Number

func (Characteristic) String

func (x Characteristic) String() string

func (Characteristic) Type

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.

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

Deprecated: Use Error.ProtoReflect.Descriptor instead.

func (*Error) GetCode

func (x *Error) GetCode() int32

func (*Error) GetMessage

func (x *Error) GetMessage() string

func (*Error) ProtoMessage

func (*Error) ProtoMessage()

func (*Error) ProtoReflect

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

func (*Error) Reset

func (x *Error) Reset()

func (*Error) String

func (x *Error) String() string

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

Deprecated: Use Option.ProtoReflect.Descriptor instead.

func (*Option) GetDetails

func (x *Option) GetDetails() map[string]string

func (*Option) GetMessage

func (x *Option) GetMessage() string

func (*Option) ProtoMessage

func (*Option) ProtoMessage()

func (*Option) ProtoReflect

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

func (*Option) Reset

func (x *Option) Reset()

func (*Option) String

func (x *Option) String() string

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

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.

Jump to

Keyboard shortcuts

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