grpc

package
v0.0.0-...-5ce893b Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2021 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InjectErrorStatusDetails

func InjectErrorStatusDetails(err error) error

func UnaryServerErrorInterceptor

func UnaryServerErrorInterceptor() grpc.UnaryServerInterceptor

Types

type Error

type Error interface {
	error
	StatusCode() codes.Code
	ErrorCode() userservice.ErrorCode
	ErrorMessage() string
}

func NewDBError

func NewDBError(err error) Error

func NewInternalServerError

func NewInternalServerError(err error) Error

func NewServiceError

func NewServiceError(code codes.Code, errCode userservice.ErrorCode, message string) Error

func NewValidationError

func NewValidationError(message string) Error

type Server

type Server struct {
	GRPC *grpc.Server
}

func NewGRPCServer

func NewGRPCServer(lc fx.Lifecycle, grpcCfg *config.GRPCConfig, logger *log.Log) *Server

Jump to

Keyboard shortcuts

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