Documentation ¶
Index ¶
- Variables
- func GenerateToken(username string) (string, error)
- func GetEnvDockerMongoURI() string
- func GetEnvLocalhostMongoURI() string
- func GetEnvMongoURI() string
- func IsDir(path string) bool
- func IsExists(path string) bool
- func IsFile(path string) bool
- func SendHTMLEMail(to string, subject string, html 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 */
超文本标记邮件模版
View Source
var TextEMailTemplate = `您的账号:%v ,密码:%v ,请及时修改。`
文本邮件模板
Functions ¶
func GetEnvDockerMongoURI ¶
func GetEnvDockerMongoURI() string
获取环境变量的容器数据库连接字符串 mongodb://username:password@mongo:27017
func GetEnvLocalhostMongoURI ¶
func GetEnvLocalhostMongoURI() string
获取环境变量的本地数据库连接字符串 mongodb://username:password@localhost:27017
func SendHTMLEMail ¶
发送超文本标记邮件
Types ¶
type JwtClaims ¶
type JwtClaims struct { Username string `json:"username"` // 用户名 jwt.RegisteredClaims // 包的默认结构体 }
自定义结构体
Click to show internal directories.
Click to hide internal directories.