server

package
v2.1.3+incompatible Latest Latest
Warning

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

Go to latest
Published: May 25, 2020 License: MIT Imports: 9 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeAddRequest

func DecodeAddRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)

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

func DecodeMultiAddRequest

func DecodeMultiAddRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)

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

func DecodeRateRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)

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

func DecodeRemoveRequest

func DecodeRemoveRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)

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

func DecodeShowRequest

func DecodeShowRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)

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

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

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

ValidateBottle runs the validations defined on Bottle.

func ValidateComponent

func ValidateComponent(message *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 ValidateWinery

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

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

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