Documentation ¶
Index ¶
- Constants
- Variables
- func RegisterSommelierServer(s grpc.ServiceRegistrar, srv SommelierServer)
- type Component
- type PickRequest
- func (*PickRequest) Descriptor() ([]byte, []int)deprecated
- func (x *PickRequest) GetName() string
- func (x *PickRequest) GetVarietal() []string
- func (x *PickRequest) GetWinery() string
- func (*PickRequest) ProtoMessage()
- func (x *PickRequest) ProtoReflect() protoreflect.Message
- func (x *PickRequest) Reset()
- func (x *PickRequest) String() string
- type SommelierClient
- type SommelierServer
- type StoredBottle
- func (*StoredBottle) Descriptor() ([]byte, []int)deprecated
- func (x *StoredBottle) GetComposition() []*Component
- func (x *StoredBottle) GetDescription() string
- func (x *StoredBottle) GetId() string
- func (x *StoredBottle) GetName() string
- func (x *StoredBottle) GetRating() uint32
- func (x *StoredBottle) GetVintage() uint32
- func (x *StoredBottle) GetWinery() *Winery
- func (*StoredBottle) ProtoMessage()
- func (x *StoredBottle) ProtoReflect() protoreflect.Message
- func (x *StoredBottle) Reset()
- func (x *StoredBottle) String() string
- type StoredBottleCollection
- func (*StoredBottleCollection) Descriptor() ([]byte, []int)deprecated
- func (x *StoredBottleCollection) GetField() []*StoredBottle
- func (*StoredBottleCollection) ProtoMessage()
- func (x *StoredBottleCollection) ProtoReflect() protoreflect.Message
- func (x *StoredBottleCollection) Reset()
- func (x *StoredBottleCollection) String() string
- type UnimplementedSommelierServer
- type UnsafeSommelierServer
- type Winery
- func (*Winery) Descriptor() ([]byte, []int)deprecated
- func (x *Winery) GetCountry() string
- func (x *Winery) GetName() string
- func (x *Winery) GetRegion() string
- func (x *Winery) GetUrl() string
- func (*Winery) ProtoMessage()
- func (x *Winery) ProtoReflect() protoreflect.Message
- func (x *Winery) Reset()
- func (x *Winery) String() string
Constants ¶
const (
Sommelier_Pick_FullMethodName = "/sommelier.Sommelier/Pick"
)
Variables ¶
var File_goagen_cellar_sommelier_proto protoreflect.FileDescriptor
var Sommelier_ServiceDesc = grpc.ServiceDesc{ ServiceName: "sommelier.Sommelier", HandlerType: (*SommelierServer)(nil), Methods: []grpc.MethodDesc{ { MethodName: "Pick", Handler: _Sommelier_Pick_Handler, }, }, Streams: []grpc.StreamDesc{}, Metadata: "goagen_cellar_sommelier.proto", }
Sommelier_ServiceDesc is the grpc.ServiceDesc for Sommelier service. It's only intended for direct use with grpc.RegisterService, and not to be introspected or modified (even as a copy)
Functions ¶
func RegisterSommelierServer ¶
func RegisterSommelierServer(s grpc.ServiceRegistrar, srv SommelierServer)
Types ¶
type Component ¶
type Component struct { // Grape varietal Varietal string `protobuf:"bytes,1,opt,name=varietal,proto3" json:"varietal,omitempty"` // Percentage of varietal in wine Percentage *uint32 `protobuf:"varint,2,opt,name=percentage,proto3,oneof" json:"percentage,omitempty"` // contains filtered or unexported fields }
func (*Component) Descriptor
deprecated
func (*Component) GetPercentage ¶
func (*Component) GetVarietal ¶
func (*Component) ProtoMessage ¶
func (*Component) ProtoMessage()
func (*Component) ProtoReflect ¶
func (x *Component) ProtoReflect() protoreflect.Message
type PickRequest ¶
type PickRequest struct { // Name of bottle to pick Name *string `protobuf:"bytes,1,opt,name=name,proto3,oneof" json:"name,omitempty"` // Varietals in preference order Varietal []string `protobuf:"bytes,2,rep,name=varietal,proto3" json:"varietal,omitempty"` // Winery of bottle to pick Winery *string `protobuf:"bytes,3,opt,name=winery,proto3,oneof" json:"winery,omitempty"` // contains filtered or unexported fields }
func (*PickRequest) Descriptor
deprecated
func (*PickRequest) Descriptor() ([]byte, []int)
Deprecated: Use PickRequest.ProtoReflect.Descriptor instead.
func (*PickRequest) GetName ¶
func (x *PickRequest) GetName() string
func (*PickRequest) GetVarietal ¶
func (x *PickRequest) GetVarietal() []string
func (*PickRequest) GetWinery ¶
func (x *PickRequest) GetWinery() string
func (*PickRequest) ProtoMessage ¶
func (*PickRequest) ProtoMessage()
func (*PickRequest) ProtoReflect ¶
func (x *PickRequest) ProtoReflect() protoreflect.Message
func (*PickRequest) Reset ¶
func (x *PickRequest) Reset()
func (*PickRequest) String ¶
func (x *PickRequest) String() string
type SommelierClient ¶
type SommelierClient interface { // Pick implements pick. Pick(ctx context.Context, in *PickRequest, opts ...grpc.CallOption) (*StoredBottleCollection, error) }
SommelierClient is the client API for Sommelier 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.
The sommelier service retrieves bottles given a set of criteria.
func NewSommelierClient ¶
func NewSommelierClient(cc grpc.ClientConnInterface) SommelierClient
type SommelierServer ¶
type SommelierServer interface { // Pick implements pick. Pick(context.Context, *PickRequest) (*StoredBottleCollection, error) // contains filtered or unexported methods }
SommelierServer is the server API for Sommelier service. All implementations must embed UnimplementedSommelierServer for forward compatibility.
The sommelier service retrieves bottles given a set of criteria.
type StoredBottle ¶
type StoredBottle struct { // ID is the unique id of the bottle. Id string `protobuf:"bytes,8,opt,name=id,proto3" json:"id,omitempty"` // Name of bottle Name string `protobuf:"bytes,2,opt,name=name,proto3" json:"name,omitempty"` // Winery that produces wine Winery *Winery `protobuf:"bytes,3,opt,name=winery,proto3" json:"winery,omitempty"` // Vintage of bottle Vintage uint32 `protobuf:"varint,4,opt,name=vintage,proto3" json:"vintage,omitempty"` // Composition is the list of grape varietals and associated percentage. Composition []*Component `protobuf:"bytes,5,rep,name=composition,proto3" json:"composition,omitempty"` // Description of bottle Description *string `protobuf:"bytes,6,opt,name=description,proto3,oneof" json:"description,omitempty"` // Rating of bottle from 1 (worst) to 5 (best) Rating *uint32 `protobuf:"varint,7,opt,name=rating,proto3,oneof" json:"rating,omitempty"` // contains filtered or unexported fields }
A StoredBottle describes a bottle retrieved by the storage service.
func (*StoredBottle) Descriptor
deprecated
func (*StoredBottle) Descriptor() ([]byte, []int)
Deprecated: Use StoredBottle.ProtoReflect.Descriptor instead.
func (*StoredBottle) GetComposition ¶
func (x *StoredBottle) GetComposition() []*Component
func (*StoredBottle) GetDescription ¶
func (x *StoredBottle) GetDescription() string
func (*StoredBottle) GetId ¶
func (x *StoredBottle) GetId() string
func (*StoredBottle) GetName ¶
func (x *StoredBottle) GetName() string
func (*StoredBottle) GetRating ¶
func (x *StoredBottle) GetRating() uint32
func (*StoredBottle) GetVintage ¶
func (x *StoredBottle) GetVintage() uint32
func (*StoredBottle) GetWinery ¶
func (x *StoredBottle) GetWinery() *Winery
func (*StoredBottle) ProtoMessage ¶
func (*StoredBottle) ProtoMessage()
func (*StoredBottle) ProtoReflect ¶
func (x *StoredBottle) ProtoReflect() protoreflect.Message
func (*StoredBottle) Reset ¶
func (x *StoredBottle) Reset()
func (*StoredBottle) String ¶
func (x *StoredBottle) String() string
type StoredBottleCollection ¶
type StoredBottleCollection struct { Field []*StoredBottle `protobuf:"bytes,1,rep,name=field,proto3" json:"field,omitempty"` // contains filtered or unexported fields }
func (*StoredBottleCollection) Descriptor
deprecated
func (*StoredBottleCollection) Descriptor() ([]byte, []int)
Deprecated: Use StoredBottleCollection.ProtoReflect.Descriptor instead.
func (*StoredBottleCollection) GetField ¶
func (x *StoredBottleCollection) GetField() []*StoredBottle
func (*StoredBottleCollection) ProtoMessage ¶
func (*StoredBottleCollection) ProtoMessage()
func (*StoredBottleCollection) ProtoReflect ¶
func (x *StoredBottleCollection) ProtoReflect() protoreflect.Message
func (*StoredBottleCollection) Reset ¶
func (x *StoredBottleCollection) Reset()
func (*StoredBottleCollection) String ¶
func (x *StoredBottleCollection) String() string
type UnimplementedSommelierServer ¶
type UnimplementedSommelierServer struct{}
UnimplementedSommelierServer 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 (UnimplementedSommelierServer) Pick ¶
func (UnimplementedSommelierServer) Pick(context.Context, *PickRequest) (*StoredBottleCollection, error)
type UnsafeSommelierServer ¶
type UnsafeSommelierServer interface {
// contains filtered or unexported methods
}
UnsafeSommelierServer may be embedded to opt out of forward compatibility for this service. Use of this interface is not recommended, as added methods to SommelierServer will result in compilation errors.
type Winery ¶
type Winery struct { // Name of winery Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Region of winery Region string `protobuf:"bytes,2,opt,name=region,proto3" json:"region,omitempty"` // Country of winery Country string `protobuf:"bytes,3,opt,name=country,proto3" json:"country,omitempty"` // Winery website URL Url *string `protobuf:"bytes,4,opt,name=url,proto3,oneof" json:"url,omitempty"` // contains filtered or unexported fields }
func (*Winery) Descriptor
deprecated
func (*Winery) GetCountry ¶
func (*Winery) ProtoMessage ¶
func (*Winery) ProtoMessage()
func (*Winery) ProtoReflect ¶
func (x *Winery) ProtoReflect() protoreflect.Message