errors

package
v2.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2022 License: MIT Imports: 12 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

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)

RegisterImplementor registers the error prompter service implementor.

func StreamServerInterceptor

func StreamServerInterceptor() grpc.StreamServerInterceptor

func UnaryResponseInterceptor

func UnaryResponseInterceptor() grpc.UnaryServerInterceptor

func With

func With(err error, msg string) error

func Withf

func Withf(err error, format string, a ...interface{}) error

Types

type Prompter

type Prompter interface {
	Translate(code int32) string
}

func Implementor

func Implementor() Prompter

Implementor returns the error prompter 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