Documentation
¶
Index ¶
Constants ¶
View Source
const ( VarPath string = "var" LogPath = VarPath + "/logs" TempPath = VarPath + "/tmp" )
View Source
const ( FiveMB int64 = 5 * 1024 * 1024 // 5MB TwentyMB int64 = 20 * 1024 * 1024 // 20MB HundredMB int64 = 100 * 1024 * 1024 // 100MB )
Variables ¶
View Source
var AmsFileAllow = struct { Image FileAllow Audio FileAllow Video FileAllow RewardFile FileAllow }{ Image: FileAllow{AllowMimeType: []string{"png", "jpg", "jpeg", "gif", "bmp"}, AllowCapacitySize: FiveMB}, Audio: FileAllow{AllowMimeType: []string{"mp3", "wav", "flac", "mid", "mov", "m4a"}, AllowCapacitySize: TwentyMB}, Video: FileAllow{AllowMimeType: []string{"mp4", "mpg", "avi", "wmv", "mov", "flv", "rmvb", "3gp", "m4v", "mkv"}, AllowCapacitySize: HundredMB}, RewardFile: FileAllow{AllowMimeType: []string{"xlsx", "xls"}, AllowCapacitySize: FiveMB}, }
AmsFileAllow 管理端上传限制
View Source
var AnonymousFileAllow = struct { File FileAllow }{ File: FileAllow{AllowMimeType: []string{"pdf", "doc", "docx", "ppt", "pptx", "xls", "xlsx"}, AllowCapacitySize: TwentyMB}, }
AnonymousFileAllow 匿名用户上传限制
View Source
var App *appConfig
View Source
var Cache *cache
View Source
var Database *database
View Source
var Etcd *etcd
View Source
var Filesystem *filesystem
View Source
var MessageQueue *messageQueue
View Source
var Monitor *monitor
View Source
var Redis *redis
View Source
var Server *serverConfig
View Source
var ThirdParty *thirdParty
View Source
var UserFileAllow = struct { Image FileAllow Audio FileAllow Video FileAllow }{ Image: FileAllow{AllowMimeType: []string{"png", "jpg", "jpeg", "gif"}, AllowCapacitySize: FiveMB}, Audio: FileAllow{AllowMimeType: []string{"mp3", "wav", "flac", "mid", "mov", "m4a"}, AllowCapacitySize: TwentyMB}, Video: FileAllow{AllowMimeType: []string{"mp4", "mpg", "avi", "wmv", "mov", "flv", "rmvb", "3gp", "m4v", "mkv"}, AllowCapacitySize: HundredMB}, }
UserFileAllow 终端用户上传限制
Functions ¶
Types ¶
type ClusterConfig ¶ added in v0.3.0
type PoolConfig ¶ added in v0.3.0
type RedisItem ¶ added in v0.3.0
type RedisItem struct {
// 单机模式配置
Host string `mapstructure:"host"`
Port string `mapstructure:"port"`
Password string `mapstructure:"password"`
DB int `mapstructure:"db"`
KeyPrefix string `mapstructure:"key_prefix"`
// 模式选择: standalone, cluster, sentinel
Mode string `mapstructure:"mode"`
// 集群模式配置
Cluster ClusterConfig `mapstructure:"cluster"`
// 哨兵模式配置
Sentinel SentinelConfig `mapstructure:"sentinel"`
// 连接池配置
Pool PoolConfig `mapstructure:"pool"`
}
Click to show internal directories.
Click to hide internal directories.