server

package
v0.0.0-...-1b5e7b1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeMultiplyRequest

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

DecodeMultiplyRequest decodes requests sent to "calc" service "multiply" endpoint.

func EncodeMultiplyResponse

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

EncodeMultiplyResponse encodes responses from the "calc" service "multiply" endpoint.

func NewMultiplyHandler

func NewMultiplyHandler(endpoint goa.Endpoint, h goagrpc.UnaryHandler) goagrpc.UnaryHandler

NewMultiplyHandler creates a gRPC handler which serves the "calc" service "multiply" endpoint.

func NewMultiplyPayload

func NewMultiplyPayload(message *calcpb.MultiplyRequest) *calc.MultiplyPayload

NewMultiplyPayload builds the payload of the "multiply" endpoint of the "calc" service from the gRPC request type.

func NewProtoMultiplyResponse

func NewProtoMultiplyResponse(result *calcviews.MultiplyresponseView) *calcpb.MultiplyResponse

NewProtoMultiplyResponse builds the gRPC response type from the result of the "multiply" endpoint of the "calc" service.

Types

type Server

type Server struct {
	MultiplyH goagrpc.UnaryHandler
	calcpb.UnimplementedCalcServer
}

Server implements the calcpb.CalcServer interface.

func New

New instantiates the server struct with the calc service endpoints.

func (*Server) Multiply

func (s *Server) Multiply(ctx context.Context, message *calcpb.MultiplyRequest) (*calcpb.MultiplyResponse, error)

Multiply implements the "Multiply" method in calcpb.CalcServer interface.

Jump to

Keyboard shortcuts

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