sommelierpb

package
v2.2.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var File_sommelier_proto protoreflect.FileDescriptor

Functions

func RegisterSommelierServer

func RegisterSommelierServer(s *grpc.Server, 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" json:"percentage,omitempty"`
	// contains filtered or unexported fields
}

func (*Component) Descriptor deprecated

func (*Component) Descriptor() ([]byte, []int)

Deprecated: Use Component.ProtoReflect.Descriptor instead.

func (*Component) GetPercentage

func (x *Component) GetPercentage() uint32

func (*Component) GetVarietal

func (x *Component) GetVarietal() string

func (*Component) ProtoMessage

func (*Component) ProtoMessage()

func (*Component) ProtoReflect

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

func (*Component) Reset

func (x *Component) Reset()

func (*Component) String

func (x *Component) String() string

type PickRequest

type PickRequest struct {

	// Name of bottle to pick
	Name string `protobuf:"bytes,1,opt,name=name,proto3" 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" 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://godoc.org/google.golang.org/grpc#ClientConn.NewStream.

func NewSommelierClient

func NewSommelierClient(cc grpc.ClientConnInterface) SommelierClient

type SommelierServer

type SommelierServer interface {
	// Pick implements pick.
	Pick(context.Context, *PickRequest) (*StoredBottleCollection, error)
}

SommelierServer is the server API for Sommelier service.

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" json:"description,omitempty"`
	// Rating of bottle from 1 (worst) to 5 (best)
	Rating uint32 `protobuf:"varint,7,opt,name=rating,proto3" 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 can be embedded to have forward compatible implementations.

func (*UnimplementedSommelierServer) Pick

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" json:"url,omitempty"`
	// contains filtered or unexported fields
}

func (*Winery) Descriptor deprecated

func (*Winery) Descriptor() ([]byte, []int)

Deprecated: Use Winery.ProtoReflect.Descriptor instead.

func (*Winery) GetCountry

func (x *Winery) GetCountry() string

func (*Winery) GetName

func (x *Winery) GetName() string

func (*Winery) GetRegion

func (x *Winery) GetRegion() string

func (*Winery) GetUrl

func (x *Winery) GetUrl() string

func (*Winery) ProtoMessage

func (*Winery) ProtoMessage()

func (*Winery) ProtoReflect

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

func (*Winery) Reset

func (x *Winery) Reset()

func (*Winery) String

func (x *Winery) String() string

Jump to

Keyboard shortcuts

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