grpcError

package
v0.0.0-...-0bb06ad Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2024 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsGrpcError

func IsGrpcError(err error) bool

Types

type GrpcErr

type GrpcErr interface {
	GetStatus() codes.Code
	SetStatus(status codes.Code) GrpcErr
	GetCode() int
	SetCode(code int) GrpcErr
	GetTitle() string
	SetTitle(title string) GrpcErr
	GetMsg() string
	SetMsg(msg string) GrpcErr
	GetDetails() map[string]string
	SetDetails(details map[string]string) GrpcErr
	GetTimestamp() time.Time
	SetTimestamp(time time.Time) GrpcErr
	Error() string
	ErrBody() error
	ToGrpcResponseErr() error
}

func NewGrpcApiError

func NewGrpcApiError(code int, message string, details map[string]string) GrpcErr

func NewGrpcApplicationError

func NewGrpcApplicationError(code int, message string, details map[string]string) GrpcErr

func NewGrpcBadRequestError

func NewGrpcBadRequestError(code int, message string, details map[string]string) GrpcErr

func NewGrpcConflictError

func NewGrpcConflictError(code int, message string, details map[string]string) GrpcErr

func NewGrpcDomainError

func NewGrpcDomainError(code int, message string, details map[string]string) GrpcErr

func NewGrpcError

func NewGrpcError(status codes.Code, code int, title string, message string, details map[string]string) GrpcErr

func NewGrpcForbiddenError

func NewGrpcForbiddenError(code int, message string, details map[string]string) GrpcErr

func NewGrpcInternalServerError

func NewGrpcInternalServerError(code int, message string, details map[string]string) GrpcErr

func NewGrpcNotFoundError

func NewGrpcNotFoundError(code int, message string, details map[string]string) GrpcErr

func NewGrpcUnAuthorizedError

func NewGrpcUnAuthorizedError(code int, message string, details map[string]string) GrpcErr

func NewGrpcValidationError

func NewGrpcValidationError(code int, message string, details map[string]string) GrpcErr

func ParseError

func ParseError(err error) GrpcErr

func ParseExternalGrpcErr

func ParseExternalGrpcErr(err error) GrpcErr

Jump to

Keyboard shortcuts

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