server

package
v0.0.0-...-047630e Latest Latest
Warning

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

Go to latest
Published: May 16, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeLoginRequest

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

DecodeLoginRequest decodes requests sent to "Auth" service "Login" endpoint.

func EncodeLoginResponse

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

EncodeLoginResponse encodes responses from the "Auth" service "Login" endpoint.

func EncodeLogoutResponse

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

EncodeLogoutResponse encodes responses from the "Auth" service "Logout" endpoint.

func NewLoginHandler

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

NewLoginHandler creates a gRPC handler which serves the "Auth" service "Login" endpoint.

func NewLoginPayload

func NewLoginPayload(message *authpb.LoginRequest) *auth.LoginPayload

NewLoginPayload builds the payload of the "Login" endpoint of the "Auth" service from the gRPC request type.

func NewLoginResponse

func NewLoginResponse() *authpb.LoginResponse

NewLoginResponse builds the gRPC response type from the result of the "Login" endpoint of the "Auth" service.

func NewLogoutHandler

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

NewLogoutHandler creates a gRPC handler which serves the "Auth" service "Logout" endpoint.

func NewLogoutResponse

func NewLogoutResponse() *authpb.LogoutResponse

NewLogoutResponse builds the gRPC response type from the result of the "Logout" endpoint of the "Auth" 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 {
	LoginH  goagrpc.UnaryHandler
	LogoutH goagrpc.UnaryHandler
	authpb.UnimplementedAuthServer
}

Server implements the authpb.AuthServer interface.

func New

New instantiates the server struct with the Auth service endpoints.

func (*Server) Login

func (s *Server) Login(ctx context.Context, message *authpb.LoginRequest) (*authpb.LoginResponse, error)

Login implements the "Login" method in authpb.AuthServer interface.

func (*Server) Logout

func (s *Server) Logout(ctx context.Context, message *authpb.LogoutRequest) (*authpb.LogoutResponse, error)

Logout implements the "Logout" method in authpb.AuthServer interface.

Jump to

Keyboard shortcuts

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