errors

package
v2.24.0 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2024 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	IsBadRequest         = errors.IsBadRequest
	IsUnauthorized       = errors.IsUnauthorized
	IsForbidden          = errors.IsForbidden
	IsNotFound           = errors.IsNotFound
	IsConflict           = errors.IsConflict
	IsInternalServer     = errors.IsInternalServer
	IsServiceUnavailable = errors.IsServiceUnavailable
	IsGatewayTimeout     = errors.IsGatewayTimeout
	IsClientClosed       = errors.IsClientClosed
)

alias

vars

Functions

func BadRequest

func BadRequest(message string) *errors.Error

func ClientClosed

func ClientClosed(message string) *errors.Error

func Conflict

func Conflict(message string) *errors.Error

func Forbidden

func Forbidden(message string) *errors.Error

func GatewayTimeout

func GatewayTimeout(message string) *errors.Error

func InternalServer

func InternalServer(message string) *errors.Error

func IsTimeoutError added in v2.19.0

func IsTimeoutError(err error) bool

func New

func New(code int, message string) *errors.Error

func NotFound

func NotFound(message string) *errors.Error

func ServiceUnavailable

func ServiceUnavailable(message string) *errors.Error

func Unauthorized

func Unauthorized(message string) *errors.Error

Types

type Group added in v2.6.0

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

func NewGroup added in v2.6.0

func NewGroup() *Group

func (*Group) Add added in v2.6.0

func (g *Group) Add(errs ...error) *Group

func (*Group) Error added in v2.6.0

func (g *Group) Error() string

func (*Group) Errors added in v2.6.0

func (g *Group) Errors() []error

func (*Group) First added in v2.6.0

func (g *Group) First() error

func (*Group) Has added in v2.6.0

func (g *Group) Has(err error) bool

func (*Group) IsNil added in v2.6.0

func (g *Group) IsNil() bool

func (*Group) Len added in v2.6.0

func (g *Group) Len() int

type TimeoutError added in v2.19.0

type TimeoutError struct {
	Timeout time.Duration
	// contains filtered or unexported fields
}

func NewTimeoutError added in v2.19.0

func NewTimeoutError(timeout time.Duration, err error) *TimeoutError

func (*TimeoutError) Error added in v2.19.0

func (e *TimeoutError) Error() string

func (*TimeoutError) Unwrap added in v2.19.0

func (e *TimeoutError) Unwrap() error

Jump to

Keyboard shortcuts

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