common

package
v0.0.0-...-8f9543d Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2022 License: GPL-3.0 Imports: 0 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewUserError

func NewUserError(message string, errorType UserErrorType) error

Types

type UserError

type UserError struct {
	ErrorType UserErrorType
	Message   string
}

func (*UserError) Error

func (u *UserError) Error() string

type UserErrorType

type UserErrorType int
const (
	VALIDATION_ERROR_TYPE      UserErrorType = 1
	SQL_ERROR_TYPE             UserErrorType = 2
	USER_EXISTS_TYPE           UserErrorType = 3
	USER_DOES_NOT_EXISTS_TYPE  UserErrorType = 4
	BAD_CREDENTIALS_ERROR      UserErrorType = 5
	INTERNAL_SERVER_ERROR_TYPE UserErrorType = 6
)

Jump to

Keyboard shortcuts

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