Documentation
¶
Index ¶
- func CreateJwtToken(data string) (signedToken string, err error)
- func CreateMutiDir(filePath string) error
- func DateTime(unix int64) (ret string)
- func DateTimeFormat(unix int64, format string) (ret string)
- func FileExist(path string) bool
- func FormatTime(t time.Time, format string) string
- func Int64ID() (int64, error)
- func Md5Crypt(str string, salt ...interface{}) (CryptStr string)
- func Md5SaltCrypt(str string) (CryptStr string)
- func ShowSubstr(s string, l int) string
- func VerifyJwtToken(jwtToken string) bool
- type IdWorker
- type JwtClaims
- type Str
- func (this *Str) DELNbsp(txt string) string
- func (this *Str) Escape(txt string) string
- func (this *Str) GetMDImgLink(txt string) string
- func (this *Str) IsItemStr(array []string, val string) bool
- func (this *Str) NumberToInt(number string) (int, error)
- func (this *Str) RepMDDesc(txt string, strlen int) string
- func (this *Str) Strip(s_ string, chars_ string) string
- func (this *Str) ToNbsp(txt string) string
- type WebInfo
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func CreateJwtToken ¶
CreateJwtToken 生成一个jwttoken
func DateTimeFormat ¶
DateTimeFormat DateTimeFormat
func Md5SaltCrypt ¶
func VerifyJwtToken ¶
VerifyToken 得到一个JwtToken,然后验证是否合法,防止伪造
Types ¶
type IdWorker ¶
type IdWorker struct {
// contains filtered or unexported fields
}
func (*IdWorker) InitIdWorker ¶
type JwtClaims ¶
type JwtClaims struct {
*jwt.StandardClaims
//jwt的数据
Data string
}
创建自己的Claims
func ParseJwtToken ¶
ParseJwtToken 解析token得到是自己创建的Claims
Click to show internal directories.
Click to hide internal directories.