errors

package
v0.1.5 Latest Latest
Warning

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

Go to latest
Published: Nov 18, 2021 License: MIT Imports: 13 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodeType

func CodeType(err error) code.Error

func ErrorCode

func ErrorCode(err error) int32

func New

func New(code interface{}, msg string) error

func Newf

func Newf(code interface{}, format string, a ...interface{}) error

func RegisterImplementor

func RegisterImplementor(prompter Prompter)

Register service implementor.

func StreamServerInterceptor

func StreamServerInterceptor() grpc.StreamServerInterceptor

func UnaryResponseInterceptor

func UnaryResponseInterceptor() grpc.UnaryServerInterceptor

Types

type Prompter

type Prompter interface {
	Translate(code int32) string
}

func Implementor

func Implementor() Prompter

Return the service implementor.

type StatusError

type StatusError spb.Status

func (*StatusError) Error

func (err *StatusError) Error() string

Jump to

Keyboard shortcuts

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