sommelierpb

package
v2.0.10+incompatible Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2020 License: MIT Imports: 7 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Component) Descriptor

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

func (*Component) GetPercentage

func (m *Component) GetPercentage() uint32

func (*Component) GetVarietal

func (m *Component) GetVarietal() string

func (*Component) ProtoMessage

func (*Component) ProtoMessage()

func (*Component) Reset

func (m *Component) Reset()

func (*Component) String

func (m *Component) String() string

func (*Component) XXX_DiscardUnknown

func (m *Component) XXX_DiscardUnknown()

func (*Component) XXX_Marshal

func (m *Component) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Component) XXX_Merge

func (m *Component) XXX_Merge(src proto.Message)

func (*Component) XXX_Size

func (m *Component) XXX_Size() int

func (*Component) XXX_Unmarshal

func (m *Component) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*PickRequest) Descriptor

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

func (*PickRequest) GetName

func (m *PickRequest) GetName() string

func (*PickRequest) GetVarietal

func (m *PickRequest) GetVarietal() []string

func (*PickRequest) GetWinery

func (m *PickRequest) GetWinery() string

func (*PickRequest) ProtoMessage

func (*PickRequest) ProtoMessage()

func (*PickRequest) Reset

func (m *PickRequest) Reset()

func (*PickRequest) String

func (m *PickRequest) String() string

func (*PickRequest) XXX_DiscardUnknown

func (m *PickRequest) XXX_DiscardUnknown()

func (*PickRequest) XXX_Marshal

func (m *PickRequest) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*PickRequest) XXX_Merge

func (m *PickRequest) XXX_Merge(src proto.Message)

func (*PickRequest) XXX_Size

func (m *PickRequest) XXX_Size() int

func (*PickRequest) XXX_Unmarshal

func (m *PickRequest) XXX_Unmarshal(b []byte) error

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.ClientConn) 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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

A StoredBottle describes a bottle retrieved by the storage service.

func (*StoredBottle) Descriptor

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

func (*StoredBottle) GetComposition

func (m *StoredBottle) GetComposition() []*Component

func (*StoredBottle) GetDescription

func (m *StoredBottle) GetDescription() string

func (*StoredBottle) GetId

func (m *StoredBottle) GetId() string

func (*StoredBottle) GetName

func (m *StoredBottle) GetName() string

func (*StoredBottle) GetRating

func (m *StoredBottle) GetRating() uint32

func (*StoredBottle) GetVintage

func (m *StoredBottle) GetVintage() uint32

func (*StoredBottle) GetWinery

func (m *StoredBottle) GetWinery() *Winery

func (*StoredBottle) ProtoMessage

func (*StoredBottle) ProtoMessage()

func (*StoredBottle) Reset

func (m *StoredBottle) Reset()

func (*StoredBottle) String

func (m *StoredBottle) String() string

func (*StoredBottle) XXX_DiscardUnknown

func (m *StoredBottle) XXX_DiscardUnknown()

func (*StoredBottle) XXX_Marshal

func (m *StoredBottle) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StoredBottle) XXX_Merge

func (m *StoredBottle) XXX_Merge(src proto.Message)

func (*StoredBottle) XXX_Size

func (m *StoredBottle) XXX_Size() int

func (*StoredBottle) XXX_Unmarshal

func (m *StoredBottle) XXX_Unmarshal(b []byte) error

type StoredBottleCollection

type StoredBottleCollection struct {
	Field                []*StoredBottle `protobuf:"bytes,1,rep,name=field,proto3" json:"field,omitempty"`
	XXX_NoUnkeyedLiteral struct{}        `json:"-"`
	XXX_unrecognized     []byte          `json:"-"`
	XXX_sizecache        int32           `json:"-"`
}

func (*StoredBottleCollection) Descriptor

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

func (*StoredBottleCollection) GetField

func (m *StoredBottleCollection) GetField() []*StoredBottle

func (*StoredBottleCollection) ProtoMessage

func (*StoredBottleCollection) ProtoMessage()

func (*StoredBottleCollection) Reset

func (m *StoredBottleCollection) Reset()

func (*StoredBottleCollection) String

func (m *StoredBottleCollection) String() string

func (*StoredBottleCollection) XXX_DiscardUnknown

func (m *StoredBottleCollection) XXX_DiscardUnknown()

func (*StoredBottleCollection) XXX_Marshal

func (m *StoredBottleCollection) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*StoredBottleCollection) XXX_Merge

func (m *StoredBottleCollection) XXX_Merge(src proto.Message)

func (*StoredBottleCollection) XXX_Size

func (m *StoredBottleCollection) XXX_Size() int

func (*StoredBottleCollection) XXX_Unmarshal

func (m *StoredBottleCollection) XXX_Unmarshal(b []byte) error

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"`
	XXX_NoUnkeyedLiteral struct{} `json:"-"`
	XXX_unrecognized     []byte   `json:"-"`
	XXX_sizecache        int32    `json:"-"`
}

func (*Winery) Descriptor

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

func (*Winery) GetCountry

func (m *Winery) GetCountry() string

func (*Winery) GetName

func (m *Winery) GetName() string

func (*Winery) GetRegion

func (m *Winery) GetRegion() string

func (*Winery) GetUrl

func (m *Winery) GetUrl() string

func (*Winery) ProtoMessage

func (*Winery) ProtoMessage()

func (*Winery) Reset

func (m *Winery) Reset()

func (*Winery) String

func (m *Winery) String() string

func (*Winery) XXX_DiscardUnknown

func (m *Winery) XXX_DiscardUnknown()

func (*Winery) XXX_Marshal

func (m *Winery) XXX_Marshal(b []byte, deterministic bool) ([]byte, error)

func (*Winery) XXX_Merge

func (m *Winery) XXX_Merge(src proto.Message)

func (*Winery) XXX_Size

func (m *Winery) XXX_Size() int

func (*Winery) XXX_Unmarshal

func (m *Winery) XXX_Unmarshal(b []byte) error

Jump to

Keyboard shortcuts

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