utils

package
v0.0.0-...-f10ba98 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const DateFormatYMD = "2006-01-02"
View Source
const Hours = 24
View Source
const LockedTimeInMinutes = 30
View Source
const MaxLoginAttempt = 3
View Source
const Minutes = 60

Variables

This section is empty.

Functions

func CheckPasswordHash

func CheckPasswordHash(password, hash string) bool

func ConvertMinutes

func ConvertMinutes(min int) string

func Deref

func Deref[T any](t *T) T

Deref return a dereference of given input

func Ref

func Ref[T any](t T) *T

func SanitizeString

func SanitizeString(src string) string

func StringToUUID

func StringToUUID(uuidStr string) uuid.UUID

StringToUUID returns a new uuid

Types

type ArrayList

type ArrayList []string

func (*ArrayList) Scan

func (j *ArrayList) Scan(value interface{}) error

func (ArrayList) Value

func (j ArrayList) Value() (driver.Value, error)

Value return json value, implement driver.Valuer interface

type Pagination

type Pagination struct {
	Paginate bool
	Page     int
	Limit    int
}

func ParsePagination

func ParsePagination(ctx echo.Context) Pagination

func (Pagination) Offset

func (p Pagination) Offset() int

func (Pagination) TotalPage

func (p Pagination) TotalPage(total int64) int

Jump to

Keyboard shortcuts

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