Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var Config = struct { LogLevel string `yaml:"logLevel" env:"LogLevel" default:"info"` Debug bool `yaml:"debug" env:"Debug" default:"false"` BinData bool `default:"true" env:"BinData"` Https bool `default:"false" env:"Https"` CertPath string `default:"" env:"CertPath"` CertKey string `default:"" env:"CertKey"` Port int `default:"8085" env:"Port"` Host string `default:"127.0.0.1" env:"HostId"` Adapter struct { VmPlatform serverConst.VmPlatform `yaml:"vmPlatform" env:"VmPlatform" default:"pve"` ContainerPlatform serverConst.ContainerPlatform `yaml:"containerPlatform" env:"ContainerPlatform" default:"portainer"` } `yaml:"adapter,flow"` Admin struct { UserName string `env:"AdminUserName" default:"admin"` Name string `env:"AdminName" default:"admin"` Password string `env:"AdminPassword" default:"P2ssw0rd"` RoleName string `env:"AdminRoleName" default:"admin"` RoleDisplayName string `env:"RoleDisplayName" default:"超级管理员"` } `yaml:"admin,flow"` DB DBConfig `yaml:"db,flow"` Redis struct { Enable bool `env:"RedisDisable" default:"false"` Host string `env:"RedisHost" default:"localhost"` Port string `env:"RedisPort" default:"6379"` Pwd string `env:"RedisPwd" default:""` } `yaml:"redis,flow"` Limit struct { Disable bool `env:"LimitDisable" default:"true"` Limit float64 `env:"LimitLimit" default:"1"` Burst int `env:"LimitBurst" default:"5"` } Qiniu struct { Enable bool `env:"QiniuEnable" default:"false"` Host string `env:"QiniuHost" default:""` Accesskey string `env:"QiniuAccesskey" default:""` Secretkey string `env:"QiniuSecretkey" default:""` Bucket string `env:"QiniuBucket" default:""` } Options struct { UploadMaxSize int64 `env:"uploadMaxSize" default:"100"` } }{}
Functions ¶
func GetRedisUris ¶
func GetRedisUris() []string
Types ¶
type DBConfig ¶
type DBConfig struct { Prefix string `yaml:"prefix" env:"DBPrefix" default:"tester_"` Name string `yaml:"name" env:"DBName" default:"tester"` Adapter string `yaml:"adapter" env:"DBAdapter" default:"sqlite3"` Host string `yaml:"host" env:"DBHost" default:"localhost"` Port string `yaml:"port" env:"DBPort" default:"3306"` User string `yaml:"user" env:"DBUser" default:"root"` Password string `yaml:"password" env:"DBPassword" default:"P2ssw0rd"` }
Click to show internal directories.
Click to hide internal directories.