Documentation ¶
Index ¶
- func DecodeAddRequest(ctx context.Context, v any, md metadata.MD) (any, error)
- func DecodeMultiAddRequest(ctx context.Context, v any, md metadata.MD) (any, error)
- func DecodeMultiUpdateRequest(ctx context.Context, v any, md metadata.MD) (any, error)
- func DecodeRateRequest(ctx context.Context, v any, md metadata.MD) (any, error)
- func DecodeRemoveRequest(ctx context.Context, v any, md metadata.MD) (any, error)
- func DecodeShowRequest(ctx context.Context, v any, md metadata.MD) (any, error)
- func EncodeAddResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)
- func EncodeListResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)
- func EncodeMultiAddResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)
- func EncodeMultiUpdateResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)
- func EncodeRateResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)
- func EncodeRemoveResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)
- func EncodeShowResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)
- func NewAddHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewAddPayload(message *storagepb.AddRequest) *storage.Bottle
- func NewListHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewMultiAddHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewMultiAddPayload(message *storagepb.MultiAddRequest) []*storage.Bottle
- func NewMultiUpdateHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewMultiUpdatePayload(message *storagepb.MultiUpdateRequest) *storage.MultiUpdatePayload
- func NewProtoAddResponse(result string) *storagepb.AddResponse
- func NewProtoMultiAddResponse(result []string) *storagepb.MultiAddResponse
- func NewProtoMultiUpdateResponse() *storagepb.MultiUpdateResponse
- func NewProtoRateResponse() *storagepb.RateResponse
- func NewProtoRemoveResponse() *storagepb.RemoveResponse
- func NewProtoShowResponse(result *storageviews.StoredBottleView) *storagepb.ShowResponse
- func NewProtoStoredBottleCollection(result storageviews.StoredBottleCollectionView) *storagepb.StoredBottleCollection
- func NewRateHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewRatePayload(message *storagepb.RateRequest) map[uint32][]string
- func NewRemoveHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewRemovePayload(message *storagepb.RemoveRequest) *storage.RemovePayload
- func NewShowHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewShowNotFoundError(er *storage.NotFound) *storagepb.ShowNotFoundError
- func NewShowPayload(message *storagepb.ShowRequest, view *string) *storage.ShowPayload
- func ValidateAddRequest(message *storagepb.AddRequest) (err error)
- func ValidateArrayOfString(val *storagepb.ArrayOfString) (err error)
- func ValidateBottle(elem *storagepb.Bottle) (err error)
- func ValidateComponent(elem *storagepb.Component) (err error)
- func ValidateMultiAddRequest(message *storagepb.MultiAddRequest) (err error)
- func ValidateMultiUpdateRequest(message *storagepb.MultiUpdateRequest) (err error)
- func ValidateRateRequest(message *storagepb.RateRequest) (err error)
- func ValidateWinery(winery *storagepb.Winery) (err error)
- type Server
- func (s *Server) Add(ctx context.Context, message *storagepb.AddRequest) (*storagepb.AddResponse, error)
- func (s *Server) List(ctx context.Context, message *storagepb.ListRequest) (*storagepb.StoredBottleCollection, error)
- func (s *Server) MultiAdd(ctx context.Context, message *storagepb.MultiAddRequest) (*storagepb.MultiAddResponse, error)
- func (s *Server) MultiUpdate(ctx context.Context, message *storagepb.MultiUpdateRequest) (*storagepb.MultiUpdateResponse, error)
- func (s *Server) Rate(ctx context.Context, message *storagepb.RateRequest) (*storagepb.RateResponse, error)
- func (s *Server) Remove(ctx context.Context, message *storagepb.RemoveRequest) (*storagepb.RemoveResponse, error)
- func (s *Server) Show(ctx context.Context, message *storagepb.ShowRequest) (*storagepb.ShowResponse, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeAddRequest ¶
DecodeAddRequest decodes requests sent to "storage" service "add" endpoint.
func DecodeMultiAddRequest ¶
DecodeMultiAddRequest decodes requests sent to "storage" service "multi_add" endpoint.
func DecodeMultiUpdateRequest ¶
DecodeMultiUpdateRequest decodes requests sent to "storage" service "multi_update" endpoint.
func DecodeRateRequest ¶
DecodeRateRequest decodes requests sent to "storage" service "rate" endpoint.
func DecodeRemoveRequest ¶
DecodeRemoveRequest decodes requests sent to "storage" service "remove" endpoint.
func DecodeShowRequest ¶
DecodeShowRequest decodes requests sent to "storage" service "show" endpoint.
func EncodeAddResponse ¶
EncodeAddResponse encodes responses from the "storage" service "add" endpoint.
func EncodeListResponse ¶
EncodeListResponse encodes responses from the "storage" service "list" endpoint.
func EncodeMultiAddResponse ¶
EncodeMultiAddResponse encodes responses from the "storage" service "multi_add" endpoint.
func EncodeMultiUpdateResponse ¶
EncodeMultiUpdateResponse encodes responses from the "storage" service "multi_update" endpoint.
func EncodeRateResponse ¶
EncodeRateResponse encodes responses from the "storage" service "rate" endpoint.
func EncodeRemoveResponse ¶
EncodeRemoveResponse encodes responses from the "storage" service "remove" endpoint.
func EncodeShowResponse ¶
EncodeShowResponse encodes responses from the "storage" service "show" endpoint.
func NewAddHandler ¶
func NewAddHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
NewAddHandler creates a gRPC handler which serves the "storage" service "add" endpoint.
func NewAddPayload ¶
func NewAddPayload(message *storagepb.AddRequest) *storage.Bottle
NewAddPayload builds the payload of the "add" endpoint of the "storage" service from the gRPC request type.
func NewListHandler ¶
func NewListHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
NewListHandler creates a gRPC handler which serves the "storage" service "list" endpoint.
func NewMultiAddHandler ¶
func NewMultiAddHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
NewMultiAddHandler creates a gRPC handler which serves the "storage" service "multi_add" endpoint.
func NewMultiAddPayload ¶
func NewMultiAddPayload(message *storagepb.MultiAddRequest) []*storage.Bottle
NewMultiAddPayload builds the payload of the "multi_add" endpoint of the "storage" service from the gRPC request type.
func NewMultiUpdateHandler ¶
func NewMultiUpdateHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
NewMultiUpdateHandler creates a gRPC handler which serves the "storage" service "multi_update" endpoint.
func NewMultiUpdatePayload ¶
func NewMultiUpdatePayload(message *storagepb.MultiUpdateRequest) *storage.MultiUpdatePayload
NewMultiUpdatePayload builds the payload of the "multi_update" endpoint of the "storage" service from the gRPC request type.
func NewProtoAddResponse ¶
func NewProtoAddResponse(result string) *storagepb.AddResponse
NewProtoAddResponse builds the gRPC response type from the result of the "add" endpoint of the "storage" service.
func NewProtoMultiAddResponse ¶
func NewProtoMultiAddResponse(result []string) *storagepb.MultiAddResponse
NewProtoMultiAddResponse builds the gRPC response type from the result of the "multi_add" endpoint of the "storage" service.
func NewProtoMultiUpdateResponse ¶
func NewProtoMultiUpdateResponse() *storagepb.MultiUpdateResponse
NewProtoMultiUpdateResponse builds the gRPC response type from the result of the "multi_update" endpoint of the "storage" service.
func NewProtoRateResponse ¶
func NewProtoRateResponse() *storagepb.RateResponse
NewProtoRateResponse builds the gRPC response type from the result of the "rate" endpoint of the "storage" service.
func NewProtoRemoveResponse ¶
func NewProtoRemoveResponse() *storagepb.RemoveResponse
NewProtoRemoveResponse builds the gRPC response type from the result of the "remove" endpoint of the "storage" service.
func NewProtoShowResponse ¶
func NewProtoShowResponse(result *storageviews.StoredBottleView) *storagepb.ShowResponse
NewProtoShowResponse builds the gRPC response type from the result of the "show" endpoint of the "storage" service.
func NewProtoStoredBottleCollection ¶
func NewProtoStoredBottleCollection(result storageviews.StoredBottleCollectionView) *storagepb.StoredBottleCollection
NewProtoStoredBottleCollection builds the gRPC response type from the result of the "list" endpoint of the "storage" service.
func NewRateHandler ¶
func NewRateHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
NewRateHandler creates a gRPC handler which serves the "storage" service "rate" endpoint.
func NewRatePayload ¶
func NewRatePayload(message *storagepb.RateRequest) map[uint32][]string
NewRatePayload builds the payload of the "rate" endpoint of the "storage" service from the gRPC request type.
func NewRemoveHandler ¶
func NewRemoveHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
NewRemoveHandler creates a gRPC handler which serves the "storage" service "remove" endpoint.
func NewRemovePayload ¶
func NewRemovePayload(message *storagepb.RemoveRequest) *storage.RemovePayload
NewRemovePayload builds the payload of the "remove" endpoint of the "storage" service from the gRPC request type.
func NewShowHandler ¶
func NewShowHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
NewShowHandler creates a gRPC handler which serves the "storage" service "show" endpoint.
func NewShowNotFoundError ¶
func NewShowNotFoundError(er *storage.NotFound) *storagepb.ShowNotFoundError
NewShowNotFoundError builds the gRPC error response type from the error of the "show" endpoint of the "storage" service.
func NewShowPayload ¶
func NewShowPayload(message *storagepb.ShowRequest, view *string) *storage.ShowPayload
NewShowPayload builds the payload of the "show" endpoint of the "storage" service from the gRPC request type.
func ValidateAddRequest ¶
func ValidateAddRequest(message *storagepb.AddRequest) (err error)
ValidateAddRequest runs the validations defined on AddRequest.
func ValidateArrayOfString ¶
func ValidateArrayOfString(val *storagepb.ArrayOfString) (err error)
ValidateArrayOfString runs the validations defined on ArrayOfString.
func ValidateBottle ¶
ValidateBottle runs the validations defined on Bottle.
func ValidateComponent ¶
ValidateComponent runs the validations defined on Component.
func ValidateMultiAddRequest ¶
func ValidateMultiAddRequest(message *storagepb.MultiAddRequest) (err error)
ValidateMultiAddRequest runs the validations defined on MultiAddRequest.
func ValidateMultiUpdateRequest ¶
func ValidateMultiUpdateRequest(message *storagepb.MultiUpdateRequest) (err error)
ValidateMultiUpdateRequest runs the validations defined on MultiUpdateRequest.
func ValidateRateRequest ¶
func ValidateRateRequest(message *storagepb.RateRequest) (err error)
ValidateRateRequest runs the validations defined on RateRequest.
func ValidateWinery ¶
ValidateWinery runs the validations defined on Winery.
Types ¶
type Server ¶
type Server struct { ListH goagrpc.UnaryHandler ShowH goagrpc.UnaryHandler AddH goagrpc.UnaryHandler RemoveH goagrpc.UnaryHandler RateH goagrpc.UnaryHandler MultiAddH goagrpc.UnaryHandler MultiUpdateH goagrpc.UnaryHandler storagepb.UnimplementedStorageServer }
Server implements the storagepb.StorageServer interface.
func New ¶
func New(e *storage.Endpoints, uh goagrpc.UnaryHandler) *Server
New instantiates the server struct with the storage service endpoints.
func (*Server) Add ¶
func (s *Server) Add(ctx context.Context, message *storagepb.AddRequest) (*storagepb.AddResponse, error)
Add implements the "Add" method in storagepb.StorageServer interface.
func (*Server) List ¶
func (s *Server) List(ctx context.Context, message *storagepb.ListRequest) (*storagepb.StoredBottleCollection, error)
List implements the "List" method in storagepb.StorageServer interface.
func (*Server) MultiAdd ¶
func (s *Server) MultiAdd(ctx context.Context, message *storagepb.MultiAddRequest) (*storagepb.MultiAddResponse, error)
MultiAdd implements the "MultiAdd" method in storagepb.StorageServer interface.
func (*Server) MultiUpdate ¶
func (s *Server) MultiUpdate(ctx context.Context, message *storagepb.MultiUpdateRequest) (*storagepb.MultiUpdateResponse, error)
MultiUpdate implements the "MultiUpdate" method in storagepb.StorageServer interface.
func (*Server) Rate ¶
func (s *Server) Rate(ctx context.Context, message *storagepb.RateRequest) (*storagepb.RateResponse, error)
Rate implements the "Rate" method in storagepb.StorageServer interface.
func (*Server) Remove ¶
func (s *Server) Remove(ctx context.Context, message *storagepb.RemoveRequest) (*storagepb.RemoveResponse, error)
Remove implements the "Remove" method in storagepb.StorageServer interface.
func (*Server) Show ¶
func (s *Server) Show(ctx context.Context, message *storagepb.ShowRequest) (*storagepb.ShowResponse, error)
Show implements the "Show" method in storagepb.StorageServer interface.