utils

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Nov 7, 2025 License: GPL-3.0 Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GenerateToken

func GenerateToken(username string) (string, int64, error)

GenerateToken 生成JWT token

func ValidateToken

func ValidateToken(tokenString string) (*models.JWTClaims, error)

ValidateToken 验证JWT token

func WebsocketProxy

func WebsocketProxy(host string)

Types

type PaginationInfo

type PaginationInfo struct {
	Page       int
	PageSize   int
	Total      int
	TotalPages int
	Offset     int
}

PaginationInfo 分页信息

func NewPagination

func NewPagination(page, pageSize, total int) *PaginationInfo

NewPagination 创建分页信息

Jump to

Keyboard shortcuts

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