server

package
v2.2.4+incompatible Latest Latest
Warning

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

Go to latest
Published: Sep 20, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeDivideRequest

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

DecodeDivideRequest decodes requests sent to "divider" service "divide" endpoint.

func DecodeIntegerDivideRequest

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

DecodeIntegerDivideRequest decodes requests sent to "divider" service "integer_divide" endpoint.

func EncodeDivideResponse

func EncodeDivideResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)

EncodeDivideResponse encodes responses from the "divider" service "divide" endpoint.

func EncodeIntegerDivideResponse

func EncodeIntegerDivideResponse(ctx context.Context, v interface{}, hdr, trlr *metadata.MD) (interface{}, error)

EncodeIntegerDivideResponse encodes responses from the "divider" service "integer_divide" endpoint.

func NewDivideHandler

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

NewDivideHandler creates a gRPC handler which serves the "divider" service "divide" endpoint.

func NewDividePayload

func NewDividePayload(message *dividerpb.DivideRequest) *divider.FloatOperands

NewDividePayload builds the payload of the "divide" endpoint of the "divider" service from the gRPC request type.

func NewDivideResponse

func NewDivideResponse(result float64) *dividerpb.DivideResponse

NewDivideResponse builds the gRPC response type from the result of the "divide" endpoint of the "divider" service.

func NewIntegerDivideHandler

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

NewIntegerDivideHandler creates a gRPC handler which serves the "divider" service "integer_divide" endpoint.

func NewIntegerDividePayload

func NewIntegerDividePayload(message *dividerpb.IntegerDivideRequest) *divider.IntOperands

NewIntegerDividePayload builds the payload of the "integer_divide" endpoint of the "divider" service from the gRPC request type.

func NewIntegerDivideResponse

func NewIntegerDivideResponse(result int) *dividerpb.IntegerDivideResponse

NewIntegerDivideResponse builds the gRPC response type from the result of the "integer_divide" endpoint of the "divider" 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 {
	IntegerDivideH goagrpc.UnaryHandler
	DivideH        goagrpc.UnaryHandler
}

Server implements the dividerpb.DividerServer interface.

func New

New instantiates the server struct with the divider service endpoints.

func (*Server) Divide

Divide implements the "Divide" method in dividerpb.DividerServer interface.

func (*Server) IntegerDivide

IntegerDivide implements the "IntegerDivide" method in dividerpb.DividerServer interface.

Jump to

Keyboard shortcuts

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