errors

package
v0.0.0-...-fba144e Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2025 License: Apache-2.0 Imports: 3 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Code

type Code int
const (
	CodeNotFound         Code // CodeNotFound = 1
	CodeStatusConflicted      // CodeStatusConflicted = 2
	CodeInvalidAuth
	CodeBadParameters
	CodeTimeout
	CodeInternal
	CodeNoMoreRetry
	CodeBadGateway
	CodeUnknown
	CodeNotImpl
)

func (Code) Int

func (c Code) Int() int

type Error

type Error struct {
	// contains filtered or unexported fields
}

func As

func As(err error) (bool, *Error)

func New

func New(c Code, err error) *Error

func NewBadGatewayError

func NewBadGatewayError(err error) *Error

func NewBadParamsError

func NewBadParamsError(err error) *Error

func NewContextError

func NewContextError(ctx context.Context) *Error

func NewInternalError

func NewInternalError(err error) *Error

func NewInvalidAuth

func NewInvalidAuth(err error) *Error

func NewNoMoreRetryError

func NewNoMoreRetryError(err error) *Error

func NewNotFoundError

func NewNotFoundError(err error) *Error

func NewNotImplError

func NewNotImplError(err error) *Error

func NewStatusConflicted

func NewStatusConflicted(err error) *Error

func NewTimeoutError

func NewTimeoutError(err error) *Error

func NewUnknownError

func NewUnknownError(err error) *Error

func Newf

func Newf(c Code, format string, args ...interface{}) *Error

func (*Error) Code

func (f *Error) Code() Code

func (*Error) Error

func (f *Error) Error() string

func (*Error) Unwrap

func (f *Error) Unwrap() error

Jump to

Keyboard shortcuts

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