Documentation
¶
Index ¶
Constants ¶
View Source
const ( HeartbeatInterval = 15 JobCheckInterval = 15 WsDefaultNameSpace = "default" WsDefaultRoom = "default" WsEvent = "OnChat" ApiPath = "/api/v1" WsPath = ApiPath + "/ws" ZentaoCasePrefix = "zentao-case-" ZentaoModulePrefix = "zentao-module-" )
View Source
const (
WinFileSchema = "winfile:///"
)
Variables ¶
View Source
var ( CONFIG Config // 配置 VIPER *viper.Viper // viper CACHE redis.UniversalClient // 缓存 PermRoutes []map[string]string // 权限路由 )
View Source
var (
SortMap = map[string]string{
"ascend": "ASC",
"descend": "DESC",
"": "ASC",
}
)
Functions ¶
func GetServerWorDir ¶
func GetServerWorDir() (ret string)
Types ¶
type Config ¶
type Config struct { MaxSize int64 `mapstructure:"max-size" json:"burst" yaml:"max-size"` System System `mapstructure:"system" json:"system" yaml:"system"` Limit Limit `mapstructure:"limit" json:"limit" yaml:"limit"` Zap myZap.Zap `mapstructure:"zap" json:"zap" yaml:"zap"` Host string Server string Ip string Port int AuthToken string ExpiredDate time.Time }
type System ¶
type System struct { Version string `mapstructure:"version" json:"version" yaml:"version"` Level string `mapstructure:"level" json:"level" yaml:"level"` // debug,release,test Addr string `mapstructure:"addr" json:"addr" yaml:"addr"` StaticPrefix string `mapstructure:"static-prefix" json:"staticPrefix" yaml:"static-prefix"` StaticPath string `mapstructure:"static-path" json:"staticPath" yaml:"static-path"` WebPath string `mapstructure:"web-path" json:"webPath" yaml:"web-path"` DbType string `mapstructure:"db-type" json:"dbType" yaml:"db-type"` TimeFormat string `mapstructure:"time-format" json:"timeFormat" yaml:"time-format"` }
Click to show internal directories.
Click to hide internal directories.