Documentation ¶
Index ¶
- func BuildImage(fontFile string, backgroundFile string, title string, lineString []string, ...) (e error)
- func IsEmail(str string) bool
- func IsEmpty(str string) bool
- func IsQQEmail(str string) bool
- func IsUrl(str string) bool
- func JsonDecode(jsonString string, v interface{}) error
- func JsonEncode(v interface{}) string
- func JwtBuild(_map jwt.MapClaims) (string, error)
- func JwtParse(str string) (jwt.MapClaims, error)
- func Md5(str string) string
- func SendEmail(to string, title string, body string) error
- type Config
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildImage ¶
Types ¶
type Config ¶
type Config struct { RunMode string `yaml:"run_mode"` //运行模式release=生产环境 test=测试环境 debug=调试环境 RedirectTokenUrl string `yaml:"redirect_token_url"` //登录成功后的回调token地址 ,变量%token% HttpHost string `yaml:"http_host"` //服务绑定地址 HttpPort int `yaml:"http_port"` //服务启动端口 JwtKey string `yaml:"jwt_key"` //jwt密钥 NewUser bool `yaml:"new_user"` //是否允许新用户使用 NoRegisterText string `yaml:"noreg_text"` //关闭注册时候的文字说明 CurlApi []string `yaml:"curl_api"` //远程请求API Task []string `yaml:"task"` //任务corn触发时间 NotifyImage struct { DomainUrl string `yaml:"domain_url"` //可用变量 {NAME} = SaveName的值 BackgroundFile string `yaml:"background_file"` //背景绘制图片 FontFile string `yaml:"font_file"` SaveName string `yaml:"save_name"` //可用变量 {DATE} = 日期Y-m-d SavePath string `yaml:"save_path"` //可用变量 {NAME} = SaveName的值 } `yaml:"notify_image"` Smtp struct { Enable bool //是否启用 Host string //邮件服务器地址 Port int //邮件服务器端口 User string //用户 Password string //密码 From string //别名来源 } QQOauth struct { ClientId string `yaml:"client_id"` ClientSecret string `yaml:"client_secret"` RedirectUri string `yaml:"redirect_uri"` } Mysql struct { Host string Port int Name string User string Password string } Redis struct { Host string Port int Password string Index int } QQBot struct { Url string QQ string Key string BindNotifyGroup []string `yaml:"bind_notify_group"` //绑定用户成功后通知的群组 SignNotifyGroup []string `yaml:"sign_notify_group"` //签到成功后通知的群组 ExpireNotifyGroup []string `yaml:"expire_notify_group"` //cookie过期后通知的群组 } }
Click to show internal directories.
Click to hide internal directories.