srverr

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jun 30, 2026 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ErrorIs

func ErrorIs(err error, code ErrCode) bool

Types

type ErrCode

type ErrCode int
const (
	ErrCodeInternal ErrCode = iota + 1
	ErrCodeValidation
	ErrCodeNotFound
	ErrCodeAuthenticationFailure
	ErrCodeAuthorizationFailure
	ErrCodeTimeout
	ErrCodeStateConflict
	ErrCodePurged
	ErrCodeRateLimited
	ErrCodePreconditionFailed
	ErrCodeDependencyFailure
)

type Error

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

func New

func New(code ErrCode, message string, err error) *Error

func Newf

func Newf(code ErrCode, message string, errmsg string, args ...any) *Error

func Unwrap

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

func (*Error) Code

func (e *Error) Code() ErrCode

func (*Error) Err

func (e *Error) Err() error

func (*Error) Error

func (e *Error) Error() string

func (*Error) Message

func (e *Error) Message() string

func (*Error) Unwrap

func (e *Error) Unwrap() error

Jump to

Keyboard shortcuts

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