Documentation ¶
Index ¶
- func DecodeAddRequest(ctx context.Context, v interface{}, md metadata.MD) (interface{}, error)
- func EncodeAddResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
- func NewAddHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewAddPayload(message *calcpb.AddRequest) *calc.AddPayload
- func NewAddResponse(result int) *calcpb.AddResponse
- type ErrorNamer
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeAddRequest ¶
DecodeAddRequest decodes requests sent to "calc" service "add" endpoint.
func EncodeAddResponse ¶
func EncodeAddResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)
EncodeAddResponse encodes responses from the "calc" service "add" endpoint.
func NewAddHandler ¶
func NewAddHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
NewAddHandler creates a gRPC handler which serves the "calc" service "add" endpoint.
func NewAddPayload ¶
func NewAddPayload(message *calcpb.AddRequest) *calc.AddPayload
NewAddPayload builds the payload of the "add" endpoint of the "calc" service from the gRPC request type.
func NewAddResponse ¶
func NewAddResponse(result int) *calcpb.AddResponse
NewAddResponse builds the gRPC response type from the result of the "add" endpoint of the "calc" service.
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 {
AddH goagrpc.UnaryHandler
}
Server implements the calcpb.CalcServer interface.
func New ¶
func New(e *calc.Endpoints, uh goagrpc.UnaryHandler) *Server
New instantiates the server struct with the calc service endpoints.
func (*Server) Add ¶
func (s *Server) Add(ctx context.Context, message *calcpb.AddRequest) (*calcpb.AddResponse, error)
Add implements the "Add" method in calcpb.CalcServer interface.