common

package
v0.0.0-...-ca31ff8 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2022 License: MIT Imports: 8 Imported by: 0

Documentation

Index

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 GetEnvMongoURI

func GetEnvMongoURI() string

获取环境变量的数据库连接字符串

func IsDir

func IsDir(path string) bool

判断路径是否为文件夹

func IsExists

func IsExists(path string) bool

判断路径文件或路径文件夹是否存在

func IsFile

func IsFile(path string) bool

判断路径是否为文件

func SendHTMLEMail

func SendHTMLEMail(to string, subject string, html string) (err error)

发送超文本标记邮件

func SendTextEMail

func SendTextEMail(to string, subject string, text string) (err error)

发送文本邮件

Types

type JwtClaims

type JwtClaims struct {
	Username             string `json:"username"` // 用户名
	jwt.RegisteredClaims        // 包的默认结构体
}

自定义结构体

Jump to

Keyboard shortcuts

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