utils

package
v0.0.0-...-85337ad Latest Latest
Warning

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

Go to latest
Published: Jun 24, 2023 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrInvalidSigningKey    = errors.New("invalid signing method")
	ErrInvalidTypeOfClaims  = errors.New("token claims are not type of `*tokenClaims`")
	ErrUserIdNotFound       = errors.New("user id not found")
	ErrTooMuchBalance       = errors.New("too much balance, your limit is under 5000")
	ErrInvalidAccountName   = errors.New("invalid account name")
	ErrUnsupportedMediaType = errors.New("unsupported media type, type must be 'jpg' or 'jpeg'")
	ErrInvalidName          = errors.New("invalid name")
	ErrInvalidType          = errors.New("invalid type")
)
View Source
var AppSettings models.Settings

Functions

func CheckBalance

func CheckBalance(balance float64) error

func CheckField

func CheckField(field string) bool

func CheckPassword

func CheckPassword(hashPassword, password string) bool

func GenFilenameWithDir

func GenFilenameWithDir(filename string) (string, error)

func GeneratePassword

func GeneratePassword(password string) (string, error)

func GetContentType

func GetContentType(filePath string) string

func IsChangeablePassword

func IsChangeablePassword(userPassword, password string) error

func PutAdditionalSettings

func PutAdditionalSettings()

func ReadSettings

func ReadSettings()

Types

This section is empty.

Jump to

Keyboard shortcuts

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