utils

package
v0.0.0-...-23a2379 Latest Latest
Warning

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

Go to latest
Published: May 8, 2023 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetToken

func GetToken(token string) (isAuth bool, err error)

Types

type Pagination

type Pagination struct {
	Page   int
	Size   int
	Offset int
	Total  int
}

func NewPagination

func NewPagination(c *gin.Context) *Pagination

func (*Pagination) GormPaginate

func (p *Pagination) GormPaginate() func(db *gorm.DB) *gorm.DB

type User

type User struct {
	Id    int    `gorm:"type:int;primary_key;autoIncrement" json:"id"`
	User  string `gorm:"type:TEXT" json:"user,omitempty"`
	Token string `gorm:"type:TEXT" json:"token,omitempty"`
}

Jump to

Keyboard shortcuts

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