helper

package
v0.0.0-...-c0306e0 Latest Latest
Warning

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

Go to latest
Published: Jul 18, 2021 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeToken

func DecodeToken(token string) (jwt.Token, error)

func EncodeToken

func EncodeToken(token jwt.Token) (string, error)

func HashPassword

func HashPassword(password string) (hash string, err error)

func LoadConfig

func LoadConfig()

func Paginate

func Paginate(db *gorm.DB, page int, perPage int) func(db *gorm.DB) *gorm.DB

Pagination

func ParseTemplate

func ParseTemplate(fs embed.FS, view string, data interface{}) string

Template parser

func TotalPages

func TotalPages(db *gorm.DB, value interface{}, perPage int) int

func TotalRows

func TotalRows(db *gorm.DB, value interface{}) int

func VerifyPassword

func VerifyPassword(password string, hash string) (match bool, err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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