server

package
v0.0.0-...-dfdfd72 Latest Latest
Warning

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

Go to latest
Published: Oct 7, 2023 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeAddRequest

func DecodeAddRequest(ctx context.Context, v any, md metadata.MD) (any, error)

DecodeAddRequest decodes requests sent to "storage" service "add" endpoint.

func DecodeMultiAddRequest

func DecodeMultiAddRequest(ctx context.Context, v any, md metadata.MD) (any, error)

DecodeMultiAddRequest decodes requests sent to "storage" service "multi_add" endpoint.

func DecodeMultiUpdateRequest

func DecodeMultiUpdateRequest(ctx context.Context, v any, md metadata.MD) (any, error)

DecodeMultiUpdateRequest decodes requests sent to "storage" service "multi_update" endpoint.

func DecodeRateRequest

func DecodeRateRequest(ctx context.Context, v any, md metadata.MD) (any, error)

DecodeRateRequest decodes requests sent to "storage" service "rate" endpoint.

func DecodeRemoveRequest

func DecodeRemoveRequest(ctx context.Context, v any, md metadata.MD) (any, error)

DecodeRemoveRequest decodes requests sent to "storage" service "remove" endpoint.

func DecodeShowRequest

func DecodeShowRequest(ctx context.Context, v any, md metadata.MD) (any, error)

DecodeShowRequest decodes requests sent to "storage" service "show" endpoint.

func EncodeAddResponse

func EncodeAddResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)

EncodeAddResponse encodes responses from the "storage" service "add" endpoint.

func EncodeListResponse

func EncodeListResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)

EncodeListResponse encodes responses from the "storage" service "list" endpoint.

func EncodeMultiAddResponse

func EncodeMultiAddResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)

EncodeMultiAddResponse encodes responses from the "storage" service "multi_add" endpoint.

func EncodeMultiUpdateResponse

func EncodeMultiUpdateResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)

EncodeMultiUpdateResponse encodes responses from the "storage" service "multi_update" endpoint.

func EncodeRateResponse

func EncodeRateResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)

EncodeRateResponse encodes responses from the "storage" service "rate" endpoint.

func EncodeRemoveResponse

func EncodeRemoveResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)

EncodeRemoveResponse encodes responses from the "storage" service "remove" endpoint.

func EncodeShowResponse

func EncodeShowResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, 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 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

func ValidateBottle(elem *storagepb.Bottle) (err error)

ValidateBottle runs the validations defined on Bottle.

func ValidateComponent

func ValidateComponent(elem *storagepb.Component) (err error)

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

func ValidateWinery(winery *storagepb.Winery) (err error)

ValidateWinery runs the validations defined on Winery.

Types

type Server

Server implements the storagepb.StorageServer interface.

func New

New instantiates the server struct with the storage service endpoints.

func (*Server) Add

Add implements the "Add" method in storagepb.StorageServer interface.

func (*Server) List

List implements the "List" method in storagepb.StorageServer interface.

func (*Server) MultiAdd

MultiAdd implements the "MultiAdd" method in storagepb.StorageServer interface.

func (*Server) MultiUpdate

MultiUpdate implements the "MultiUpdate" method in storagepb.StorageServer interface.

func (*Server) Rate

Rate implements the "Rate" method in storagepb.StorageServer interface.

func (*Server) Remove

Remove implements the "Remove" method in storagepb.StorageServer interface.

func (*Server) Show

Show implements the "Show" method in storagepb.StorageServer interface.

Jump to

Keyboard shortcuts

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