server

package
v0.0.0-...-02e4f75 Latest Latest
Warning

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

Go to latest
Published: Aug 31, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeSayHelloRequest

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

DecodeSayHelloRequest decodes requests sent to "hello" service "say-hello" endpoint.

func EncodeSayHelloResponse

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

EncodeSayHelloResponse encodes responses from the "hello" service "say-hello" endpoint.

func NewProtoSayHelloResponse

func NewProtoSayHelloResponse(result string) *hellopb.SayHelloResponse

NewProtoSayHelloResponse builds the gRPC response type from the result of the "say-hello" endpoint of the "hello" service.

func NewSayHelloHandler

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

NewSayHelloHandler creates a gRPC handler which serves the "hello" service "say-hello" endpoint.

func NewSayHelloPayload

func NewSayHelloPayload(message *hellopb.SayHelloRequest) *hello.SayHelloPayload

NewSayHelloPayload builds the payload of the "say-hello" endpoint of the "hello" service from the gRPC request type.

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 {
	SayHelloH goagrpc.UnaryHandler
	hellopb.UnimplementedHelloServer
}

Server implements the hellopb.HelloServer interface.

func New

New instantiates the server struct with the hello service endpoints.

func (*Server) SayHello

func (s *Server) SayHello(ctx context.Context, message *hellopb.SayHelloRequest) (*hellopb.SayHelloResponse, error)

SayHello implements the "SayHello" method in hellopb.HelloServer interface.

Jump to

Keyboard shortcuts

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