merror

package
v0.0.0-...-dab1d25 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	UnknownError           = "unknown error"
	InvalidRequestBody     = "invalid request body"
	ValidationError        = "validation error"
	InternalDatabaseError  = "internal database service error"
	InternalRedisError     = "internal redis service error"
	SessionServiceError    = "session service error"
	AuthServiceError       = "authentication service error"
	EmailExistsError       = "user or email already exists"
	CredentialError        = "wrong or invalid user and password"
	UserNotFound           = "user not found"
	SessionExpires         = "session not found or already expired"
	SessionCookieNotFound  = "session id cookie not found or empty"
	JWTTokenCookieNotFound = "jwt token cookie not found"
	BcryptPassCompareError = "bcrypt password comparation error"
	BcryptPassGenError     = "bcrypt password hash generation error"
	UUIDGenError           = "uuid generation error"
	UUIDParsingError       = "uuid parsing error"
	JWTGenError            = "jwt token generation error"
	JWTParsingError        = "jwt token parsing error"
	PaylodParsingError     = "request payload parsing error"
	TypeAssertionError     = "type assertion error"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Merror

type Merror struct {
	Cause  string
	Detail error
	// contains filtered or unexported fields
}

func FromError

func FromError(err error) *Merror

func New

func New(cause string, detail ...error) *Merror

func (*Merror) Error

func (me *Merror) Error() string

func (*Merror) FiberError

func (me *Merror) FiberError(c *fiber.Ctx) error

func (*Merror) WithHTTPCode

func (me *Merror) WithHTTPCode(code int) *Merror

Jump to

Keyboard shortcuts

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