utils

package
v0.0.0-...-fe60696 Latest Latest
Warning

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

Go to latest
Published: Apr 21, 2022 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exists

func Exists(path string) bool

判断所给路径文件/文件夹是否存在

func GetWriteSyncer

func GetWriteSyncer(file string) zapcore.WriteSyncer

func IsDir

func IsDir(path string) bool

判断所给路径是否为文件夹

func IsFile

func IsFile(path string) bool

判断所给路径是否为文件

func PathExists

func PathExists(path string) (bool, error)

Types

type BaseClaims

type BaseClaims struct {
	ID       string
	Username string
}

type CustomClaims

type CustomClaims struct {
	BaseClaims
	jwt.StandardClaims
}

type JWT

type JWT struct {
	SigningKey []byte
}

func (*JWT) CreateClaims

func (j *JWT) CreateClaims(baseClaims BaseClaims) CustomClaims

func (*JWT) CreateToken

func (j *JWT) CreateToken(claims CustomClaims) (string, error)

Jump to

Keyboard shortcuts

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