Documentation ¶
Index ¶
- func DecodeDivideRequest(ctx context.Context, v any, md metadata.MD) (any, error)
- func EncodeDivideResponse(ctx context.Context, v any, hdr, trlr *metadata.MD) (any, error)
- func NewDivideDivByZeroError(er *calc.DivByZero) *calcpb.DivideDivByZeroError
- func NewDivideHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
- func NewDividePayload(message *calcpb.DivideRequest) *calc.DividePayload
- func NewProtoDivideResponse(result *calc.DivideResult) *calcpb.DivideResponse
- type Server
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeDivideRequest ¶
DecodeDivideRequest decodes requests sent to "calc" service "divide" endpoint.
func EncodeDivideResponse ¶
EncodeDivideResponse encodes responses from the "calc" service "divide" endpoint.
func NewDivideDivByZeroError ¶
func NewDivideDivByZeroError(er *calc.DivByZero) *calcpb.DivideDivByZeroError
NewDivideDivByZeroError builds the gRPC error response type from the error of the "divide" endpoint of the "calc" service.
func NewDivideHandler ¶
func NewDivideHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler
NewDivideHandler creates a gRPC handler which serves the "calc" service "divide" endpoint.
func NewDividePayload ¶
func NewDividePayload(message *calcpb.DivideRequest) *calc.DividePayload
NewDividePayload builds the payload of the "divide" endpoint of the "calc" service from the gRPC request type.
func NewProtoDivideResponse ¶
func NewProtoDivideResponse(result *calc.DivideResult) *calcpb.DivideResponse
NewProtoDivideResponse builds the gRPC response type from the result of the "divide" endpoint of the "calc" service.
Types ¶
type Server ¶
type Server struct { DivideH goagrpc.UnaryHandler calcpb.UnimplementedCalcServer }
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) Divide ¶
func (s *Server) Divide(ctx context.Context, message *calcpb.DivideRequest) (*calcpb.DivideResponse, error)
Divide implements the "Divide" method in calcpb.CalcServer interface.