Documentation ¶
Index ¶
- Variables
- func DecodeBase64(str string) (dcs string)
- func EncodeBase64(str string) (ecs string)
- func GenerateToken(username string) (string, error)
- func GetDay() (date string)
- func GetHour() (date string)
- func GetHourMinuteSecond() (date string)
- func GetMinute() (date string)
- func GetMonth() (date string)
- func GetSecond() (date string)
- func GetYear() (date string)
- func GetYearMonthDay() (date string)
- func GetYearMonthDayHourMinuteSecond() (date string)
- func SendHTMLEMail(to string, subject string, text string) (err error)
- func SendTextEMail(to string, subject string, text string) (err error)
- type JwtClaims
Constants ¶
This section is empty.
Variables ¶
View Source
var HTMLEMailTemplate = `` /* 428-byte string literal not displayed */
HTMLEMailTemplate 超文本标记邮件模版
Functions ¶
func GenerateToken ¶
GenerateToken 生成令牌 https://godoc.org/github.com/dgrijalva/jwt-go#NewWithClaims
func GetHourMinuteSecond ¶
func GetHourMinuteSecond() (date string)
GetHourMinuteSecond 获取时分秒,输出格式“15:04:05”
func GetYearMonthDayHourMinuteSecond ¶
func GetYearMonthDayHourMinuteSecond() (date string)
GetYearMonthDayHourMinuteSecond 获取年月日时分秒,输出格式“2006-01-02 15:04:05”
func SendHTMLEMail ¶
SendHTMLEMail 发送超文本标记邮件
Types ¶
type JwtClaims ¶
type JwtClaims struct { Username string `json:"username"` jwt.StandardClaims // jwt包中的默认字段 }
JwtClaims 结构体
func ParseToken ¶
ParseToken 解析令牌 https://godoc.org/github.com/dgrijalva/jwt-go#ParseWithClaims
Click to show internal directories.
Click to hide internal directories.