utils

package
v0.0.0-...-4f392d0 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2019 License: GPL-3.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FormPost

func FormPost(file *auxpi.FormFile, url string, header map[string]string) string

func GenerateToken

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

func GetSha256CodeWithSalt

func GetSha256CodeWithSalt(s string) string

Types

type Claims

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

func ParseToken

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

type UpLoadTools

func (*UpLoadTools) HandleUrl

func (this *UpLoadTools) HandleUrl(apiSelect string, f multipart.File, h *multipart.FileHeader) string

返回不同图床的 URL

func (*UpLoadTools) Validate

func (this *UpLoadTools) Validate(contentType string, fileName string) bool

验证文件后缀&文件MIME

Jump to

Keyboard shortcuts

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