errors

package
v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2025 License: MIT Imports: 5 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNotImplemented       = New("not implemented")
	ErrConfigNotFound       = New("config file not found")
	ErrStreamingUnsupported = New("streaming unsupported")

	ErrConfigDecoding = func(err error) error { return New(fmt.Sprintf("config decoding failed: %s", err.Error())) }
	ErrNotConfigured  = func(name string) error { return New(fmt.Sprintf("%s not configured", name)) }

	ErrEmailAlreadyUsed       = New("email already used")
	ErrEmailOrPasswordInvalid = New("email or password invalid")
	ErrInvalidCredentials     = New("invalid credentials")

	ErrTokenGenerationFail = New("token generation fail")
	ErrInvalidPolicyData   = New("invalid policy data")
	ErrDeleteRoleWithUsers = New("can't delete role with some users")

	ErrNilPointerDeref = New("nil pointer dereference")
	ErrGetOfNoValue    = New("get of no value")
	ErrNoDatabaseFound = New("no database found")

	ErrNoValuePresent = New("no value present")
)

Functions

This section is empty.

Types

type Error

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

func New

func New(text string, opts ...Option) Error

func (Error) Error

func (e Error) Error() string

func (Error) MarshalJSON

func (e Error) MarshalJSON() ([]byte, error)

func (Error) WriteResponse

func (e Error) WriteResponse(rw http.ResponseWriter)

type Option

type Option func(*Error)

func WithCode

func WithCode(code int) Option

Jump to

Keyboard shortcuts

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