Documentation ¶
Overview ¶
package conf 为配置相关.
Index ¶
- Constants
- Variables
- func GetAppKey() string
- func GetDatabasePrefix() string
- func GetDefaultAvatar() string
- func GetDefaultCover() string
- func GetEnableExport() bool
- func GetExportLimitNum() int
- func GetExportOutputPath() string
- func GetExportProcessNum() int
- func GetExportQueueLimitNum() int
- func GetTokenSize() int
- func GetUploadFileExt() []string
- func GetUploadFileSize() int64
- func IsAllowUploadFileExt(ext string) bool
- func URLFor(endpoint string, values ...interface{}) string
- func URLForNotHost(endpoint string, values ...interface{}) string
- func URLForWithCdnCSS(p string, v ...string) string
- func URLForWithCdnImage(p string) string
- func URLForWithCdnJs(p string, v ...string) string
- func URLForWithStatic(p string, v ...string) string
- func WorkingDir(elem ...string) string
- type BookRole
- type SMTPConf
- type SystemRole
Constants ¶
View Source
const ( LoggerOperate = "operate" LoggerSystem = "system" LoggerException = "exception" LoggerDocument = "document" )
View Source
const ( //本地账户校验 AuthMethodLocal = "local" //LDAP用户校验 AuthMethodLDAP = "ldap" )
View Source
const CaptchaSessionName = "__captcha__"
View Source
const LoginSessionName = "LoginSessionName"
登录用户的Session名
View Source
const PageSize = 10
PageSize 默认分页条数.
View Source
const RegexpAccount = `^[a-zA-Z][a-zA-Z0-9\.-]{2,50}$`
允许用户名中出现点号
Variables ¶
View Source
var ( VERSION string BUILD_TIME string GO_VERSION string )
View Source
var ( ConfigurationFile = "./conf/app.conf" WorkingDirectory = "./" LogFile = "./runtime/logs" BaseUrl = "" AutoLoadDelay = 0 )
Functions ¶
func GetDatabasePrefix ¶
func GetDatabasePrefix() string
func URLForNotHost ¶ added in v1.0.3
func URLForWithStatic ¶ added in v1.0.7
注册静态文件模板方法
Types ¶
type SMTPConf ¶ added in v1.0.7
type SMTPConf struct { EnableMail bool MailNumber int SmtpUserName string SmtpHost string SmtpPassword string SmtpPort int FormUserName string MailExpired int Secure string }
func GetMailConfig ¶
func GetMailConfig() *SMTPConf
type SystemRole ¶ added in v1.0.3
type SystemRole int
系统角色
const ( // 超级管理员. MemberSuperRole SystemRole = iota //普通管理员. MemberAdminRole //普通用户. MemberGeneralRole )
用户权限
Click to show internal directories.
Click to hide internal directories.