constants

package
v0.0.0-...-9ac2298 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: BSD-3-Clause Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	INFO_LOG_PREFIX   string = "[INFO]"
	ERROR_LOG_PREFIX  string = "[ERROR]"
	ACCESS_LOG_PREFIX string = "[ACCESS]"
)
View Source
const (
	ChainStr = "abcdefghijklmnopqrstuvwxyzABCDEFGHIJKLMNOPQRSTUVWXYZ0123456789!@#$%^&*()_+{}[]|:<>?/.,';][=-`~"
	ChainNum = "0123456789"
)
View Source
const (
	ERROR_LOG_PATH  = "logs/error.log"
	INFO_LOG_PATH   = "logs/info.log"
	ACCESS_LOG_PATH = "logs/access.log"
)

Variables

View Source
var (
	ErrRequiredUUID error = errors.New("uuid is required")
	ErrInvalidUUID  error = errors.New("uuid is invalid")
)
View Source
var (
	ErrInvalidEmail error = errors.New("email is invalid")
	ErrEmailLen     error = errors.New("email must be between 8 and 32 characters long")
)
View Source
var (
	ErrInvalidPassword      error = errors.New("password is invalid, must be between 8 and 32 characters long and contains at least one lowercase letter, one uppercase letter, one digit and one special character")
	ErrPasswordLen          error = errors.New("password must be between 8 and 32 characters long")
	ErrPasswordEmptyLower   error = errors.New("password must contain at least one lowercase letter")
	ErrPasswordEmptyUpper   error = errors.New("password must contain at least one uppercase letter")
	ErrPasswordEmptyDigit   error = errors.New("password must contain at least one digit")
	ErrPasswordEmptySpecial error = errors.New("password must contain at least one special character")
)
View Source
var (
	ErrHashPassword    error = errors.New("error when encrypt password")
	ErrComparePassword error = errors.New("password not match")
)
View Source
var (
	ErrInvalidPhone error = errors.New("phone is invalid")
)
View Source
var (
	ErrInvalidUsername error = errors.New("username is invalid, must be between 3 and 20 characters long and only contains letters, numbers and underscore")
)

Functions

This section is empty.

Types

This section is empty.

Jump to

Keyboard shortcuts

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