internal

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2025 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Tx          int = 10
	TxCommit        = 11
	TxNotUnique     = 12
	TxUnknown       = 19

	Auth                      = 200
	AuthDecode                = 210
	AuthForm                  = 220
	AuthFormEmailEmpty        = 221
	AuthFormEmailInvalid      = 222
	AuthFormPasswordInvalid   = 223
	AuthFormPasswordWrong     = 224
	AuthFormPasswordsMismatch = 225

	QueryParams      = 300
	QueryParamsToken = 301

	UserCredentials            = 400
	UserCredentialsNotExists   = 401
	UserCredentialsToken       = 402
	UserCredentialsIsNotActive = 403
	UserCredentialsReset       = 404
	UserCredentialsCreate      = 405
	UserCredentialsUpdate      = 406

	Profile = 500

	Token        = 600
	TokenEmpty   = 601
	TokenExpired = 602

	JSON        = 700
	JSONDecoder = 701
	JSONEncoder = 702

	DB        = 800
	DBGetUser = 801
)

Variables

This section is empty.

Functions

This section is empty.

Types

type DefaultMessagesList

type DefaultMessagesList map[int]Error

type Error

type Error struct {
	ErrCode      int
	InternalCode int
	Message      string
	Timestamp    any
}

func New

func New(code int, err error, internal int) *Error

func NewDefault

func NewDefault(code int, internal int) *Error

func (*Error) Error

func (e *Error) Error() string

func (*Error) GetCode

func (e *Error) GetCode() int

func (*Error) GetMessage

func (e *Error) GetMessage() string

Jump to

Keyboard shortcuts

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