Documentation ¶
Index ¶
- func DecodeAddRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)
- func DecodeMultiAddRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)
- func DecodeMultiUpdateRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)
- func DecodeRateRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)
- func DecodeRemoveRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)
- func DecodeShowRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)
- func EncodeAddResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
- func EncodeListResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
- func EncodeMultiAddResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
- func EncodeMultiUpdateResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
- func EncodeRateResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
- func EncodeRemoveResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
- func EncodeShowResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
- func NewAddHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewAddPayload(message *storagepb.AddRequest) *storage.Bottle
- func NewAddResponse(result string) *storagepb.AddResponse
- 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 NewMultiAddResponse(result []string) *storagepb.MultiAddResponse
- func NewMultiUpdateHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewMultiUpdatePayload(message *storagepb.MultiUpdateRequest) *storage.MultiUpdatePayload
- func NewMultiUpdateResponse() *storagepb.MultiUpdateResponse
- func NewRateHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewRatePayload(message *storagepb.RateRequest) map[uint32][]string
- func NewRateResponse() *storagepb.RateResponse
- func NewRemoveHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewRemovePayload(message *storagepb.RemoveRequest) *storage.RemovePayload
- func NewRemoveResponse() *storagepb.RemoveResponse
- 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 NewShowResponse(result *storageviews.StoredBottleView) *storagepb.ShowResponse
- func NewStoredBottleCollection(result storageviews.StoredBottleCollectionView) *storagepb.StoredBottleCollection
- func ValidateAddRequest(message *storagepb.AddRequest) (err error)
- func ValidateBottle(message *storagepb.Bottle) (err error)
- func ValidateComponent(message *storagepb.Component) (err error)
- func ValidateMultiAddRequest(message *storagepb.MultiAddRequest) (err error)
- func ValidateMultiUpdateRequest(message *storagepb.MultiUpdateRequest) (err error)
- func ValidateWinery(message *storagepb.Winery) (err error)
- type ErrorNamer
- 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 ¶
func DecodeMultiUpdateRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)
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 ¶
func EncodeAddResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
EncodeAddResponse encodes responses from the "storage" service "add" endpoint.
func EncodeListResponse ¶
func EncodeListResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
EncodeListResponse encodes responses from the "storage" service "list" endpoint.
func EncodeMultiAddResponse ¶
func EncodeMultiAddResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
EncodeMultiAddResponse encodes responses from the "storage" service "multi_add" endpoint.
func EncodeMultiUpdateResponse ¶
func EncodeMultiUpdateResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
EncodeMultiUpdateResponse encodes responses from the "storage" service "multi_update" endpoint.
func EncodeRateResponse ¶
func EncodeRateResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
EncodeRateResponse encodes responses from the "storage" service "rate" endpoint.
func EncodeRemoveResponse ¶
func EncodeRemoveResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
EncodeRemoveResponse encodes responses from the "storage" service "remove" endpoint.
func EncodeShowResponse ¶
func EncodeShowResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
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 NewAddResponse ¶
func NewAddResponse(result string) *storagepb.AddResponse
NewAddResponse builds the gRPC response type from the result of the "add" endpoint of the "storage" service.
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 NewMultiAddResponse ¶
func NewMultiAddResponse(result []string) *storagepb.MultiAddResponse
NewMultiAddResponse builds the gRPC response type from the result of the "multi_add" endpoint of the "storage" service.
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 NewMultiUpdateResponse ¶
func NewMultiUpdateResponse() *storagepb.MultiUpdateResponse
NewMultiUpdateResponse builds the gRPC response type from the result of the "multi_update" 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 NewRateResponse ¶
func NewRateResponse() *storagepb.RateResponse
NewRateResponse builds the gRPC response type from the result of the "rate" endpoint of the "storage" service.
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 NewRemoveResponse ¶
func NewRemoveResponse() *storagepb.RemoveResponse
NewRemoveResponse builds the gRPC response type from the result of the "remove" endpoint of the "storage" service.
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 NewShowResponse ¶
func NewShowResponse(result *storageviews.StoredBottleView) *storagepb.ShowResponse
NewShowResponse builds the gRPC response type from the result of the "show" endpoint of the "storage" service.
func NewStoredBottleCollection ¶
func NewStoredBottleCollection(result storageviews.StoredBottleCollectionView) *storagepb.StoredBottleCollection
NewStoredBottleCollection builds the gRPC response type from the result of the "list" endpoint of the "storage" service.
func ValidateAddRequest ¶
func ValidateAddRequest(message *storagepb.AddRequest) (err error)
ValidateAddRequest runs the validations defined on AddRequest.
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 ValidateWinery ¶
ValidateWinery runs the validations defined on Winery.
Types ¶
type ErrorNamer ¶
type ErrorNamer interface {
ErrorName() string
}
ErrorNamer is an interface implemented by generated error structs that exposes the name of the error as defined in the expr.
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 }
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.