utils

package
v0.0.0-...-7a4b419 Latest Latest
Warning

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

Go to latest
Published: Oct 29, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	KEY    string = "authenticated"
	USERID string = "user_id"
	NAME   string = "user_name"
	CENTRE string = "centre"
)

Functions

func CalculateAge

func CalculateAge(birthdate, today time.Time) int

func CheckPasswordHash

func CheckPasswordHash(password string, hash string) bool

func DecodeString

func DecodeString(str string) string

func EncodeString

func EncodeString(str string) string

func GeneratePassword

func GeneratePassword() string

func GenerateRegNo

func GenerateRegNo(index int) string

func HashPassword

func HashPassword(password string) (string, error)

func IsPhone

func IsPhone(phone string) bool

func NumberGenerator

func NumberGenerator(max int) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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