utils

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	InternalServerErrorString = "Internal server error"
)

Variables

View Source
var (
	// email errors
	ErrInvalidEmail    = errors.New("invalid email format")
	ErrMissingEmail    = errors.New("no email input given")
	ErrDuplicateEmail  = errors.New("email already exists")
	ErrSMTPServerIssue = errors.New("SMTP server issue")

	// users errors
	ErrPasswordTooShort          = errors.New("password too short")
	ErrPasswordTooLong           = errors.New("password too long")
	ErrPasswordSecurity          = errors.New("password not safe")
	ErrHashingPassword           = errors.New("error hashing password")
	ErrInvalidUserName           = errors.New("invalid user name")
	ErrUserNameTooShort          = errors.New("user name too short")
	ErrUserNameTooLong           = errors.New("user name too long")
	ErrUserNameWithNumericVals   = errors.New("user name with numeric characters")
	ErrPasswordInvalid           = errors.New("invalid password")
	ErrDOBFormat                 = errors.New("invalid dob format")
	ErrInvalidPhoneNumber        = errors.New("invalid phone number")
	ErrUserNotFound              = errors.New("user not found")
	ErrVerificationEntryNotFound = errors.New("pre registration not found")
	ErrInvalidName               = errors.New("invalid name")
	ErrMissingPhoneNumber        = errors.New("no phone number input given")
	ErrUserBlocked               = errors.New("user is blocked")
	ErrUpdateLastLogin           = errors.New("error updating last login")

	// otp errors
	ErrGenerateOTP        = errors.New("error generating otp")
	ErrMissingOTP         = errors.New("need valid otp input")
	ErrOtpLength          = errors.New("otp must have 6 digits")
	ErrOtpNums            = errors.New("non digits in otp")
	ErrInvalidOTP         = errors.New("invalid OTP")
	ErrOTPAlreadyVerified = errors.New("email already verified")
	ErrOTPExpired         = errors.New("OTP has expired")

	// Pre-registration errors
	ErrCreateVericationEntry    = errors.New("error creating verification entry")
	ErrPreRegistredUserNotFound = errors.New("pre-registred user not found")

	// login errors
	ErrGenerateJWTTokenWithRole = errors.New("error generate jwt token with role")
)

Functions

This section is empty.

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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