utils

package
v0.0.0-...-66d6a2b Latest Latest
Warning

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

Go to latest
Published: Jun 3, 2023 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AppDebug

func AppDebug() bool

func GenerateToken

func GenerateToken(ID int, username, password string) (string, error)

func GetClientIp

func GetClientIp(req *ghttp.Request) string

func GetIpCity

func GetIpCity(ipclient string) string

func InStringArray

func InStringArray(uri string, items ...interface{}) bool

func Md5

func Md5(usernamepasswd string) (string, error)

func Uid

func Uid(req *ghttp.Request) int

Types

type Token

type Token struct {
	ExpiresAt int64 `json:"expires"`
}

func ParseToken

func ParseToken(token string) (Token, error)

type UserInfo

type UserInfo struct {
	Realname string
	Username string
}

func UInfo

func UInfo(req *ghttp.Request) UserInfo

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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