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 URLForWithCdnCss(p string, v ...string) string
- func URLForWithCdnImage(p string) string
- func URLForWithCdnJs(p string, v ...string) string
- func WorkingDir(elem ...string) string
- type SmtpConf
Constants ¶
View Source
const ( // 超级管理员. MemberSuperRole = 0 //普通管理员. MemberAdminRole = 1 //普通用户. MemberGeneralRole = 2 )
用户权限
View Source
const ( // 创始人. BookFounder = 0 //管理者 BookAdmin = 1 //编辑者. BookEditor = 2 //观察者 BookObserver = 3 )
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}$`
允许用户名中出现点号
View Source
const RegexpEmail = "" /* 135-byte string literal not displayed */
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 URLForWithCdnCss ¶ added in v0.10.1
func URLForWithCdnImage ¶ added in v0.10.1
func URLForWithCdnJs ¶ added in v0.10.1
func WorkingDir ¶ added in v0.13.1
Types ¶
Click to show internal directories.
Click to hide internal directories.