utils

package
v0.0.0-...-c4be96f Latest Latest
Warning

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

Go to latest
Published: Jun 25, 2024 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ComparePasswords

func ComparePasswords(hashPassword string, password string) (bool, error)

func HashPassword

func HashPassword(password string) (string, error)

func Paginate

func Paginate(value interface{}, pagination *Pagination, db *gorm.DB) func(db *gorm.DB) *gorm.DB

func ParseBody

func ParseBody(body []byte, x interface{})

Types

type Pagination

type Pagination struct {
	Take     int `json:"take"`
	Page     int `json:"page"`
	Total    int `json:"total"`
	LastPage int `json:"last_page"`
}

Jump to

Keyboard shortcuts

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