aerrors

package
v0.0.0-...-0fb68f2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTypeUnknown       = ErrorType{"unknown"}       //nolint:gochecknoglobals
	ErrTypeInvalidInput  = ErrorType{"invalid-input"} //nolint:gochecknoglobals
	ErrTypeAuthorization = ErrorType{"authorization"} //nolint:gochecknoglobals
)

Functions

This section is empty.

Types

type AppError

type AppError struct {
	Key       string
	Msg       string
	Cause     error
	ErrorType ErrorType
}

func NewAuthorizationError

func NewAuthorizationError(err error, key string) AppError

func NewInvalidInputError

func NewInvalidInputError(err error, key string, msg string) AppError

func NewInvalidInputMsg

func NewInvalidInputMsg(key string, msg string) AppError

func NewUnknownError

func NewUnknownError(err error, key string) AppError

func (AppError) Error

func (e AppError) Error() string

func (AppError) Unwrap

func (e AppError) Unwrap() error

type ErrorType

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

Jump to

Keyboard shortcuts

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