util

package
v0.0.0-...-c979b4e Latest Latest
Warning

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

Go to latest
Published: Feb 28, 2023 License: BSD-2-Clause, MPL-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EncodeMD5

func EncodeMD5(value string) string

EncodeMD5 md5 encryption

func GenerateToken

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

GenerateToken generate tokens used for auth

func Get

func Get(url string) ([]byte, error)

func GetPage

func GetPage(c *gin.Context) int

GetPage get page parameters

func Post

func Post(url string, method string, data []byte) ([]byte, error)

Types

type Claims

type Claims struct {
	Username string `json:"username"`
	Password string `json:"password"`
	jwt.StandardClaims
}

func ParseToken

func ParseToken(token string) (*Claims, error)

ParseToken parsing token

Jump to

Keyboard shortcuts

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