Documentation ¶
Index ¶
- Constants
- Variables
- func ConfigureFileName() string
- func ConfigureFileNameIn(name string) stringdeprecated
- func ConfigureFileNameInEnv(name string) string
- func ConfigureFileNameWithEnv(name string) string
- func ConfigureFileNameWithoutEnv(name string) string
- func ConfigureFilePath() string
- func DataFilePath() string
- func IsDevEnvironment() bool
- func IsProdEnvironment() bool
- func IsTestEnvironment() bool
- type Config
Constants ¶
View Source
const ( EProd = "prod" ETest = "test" EDev = "dev" )
View Source
const ( KForever = "forever" KDaemon = "daemon" KPprof = "pprof" KPath = "path" KEnv = "env" KConf = "conf" KDataPath = "dataPath" KAppId = "appid" KServer = "server" KLog = "log" KGinMode = "mode" KRedis = "redis" KDb = "db" KMq = "mq" )
Variables ¶
Functions ¶
func ConfigureFileName ¶ added in v0.5.41
func ConfigureFileName() string
func ConfigureFileNameIn
deprecated
added in
v0.6.2
func ConfigureFileNameInEnv ¶
func ConfigureFileNameWithEnv ¶ added in v1.0.39
func ConfigureFileNameWithoutEnv ¶ added in v1.0.39
func ConfigureFilePath ¶ added in v0.5.41
func ConfigureFilePath() string
func DataFilePath ¶ added in v1.0.39
func DataFilePath() string
func IsDevEnvironment ¶ added in v1.0.51
func IsDevEnvironment() bool
func IsProdEnvironment ¶ added in v1.0.51
func IsProdEnvironment() bool
func IsTestEnvironment ¶ added in v1.0.51
func IsTestEnvironment() bool
Types ¶
type Config ¶
type Config struct { LogConfig logger.Config `json:"log" yaml:"log" xml:"log"` GinMode string `json:"mode" yaml:"mode" xml:"mode"` Server string `json:"server" yaml:"server" xml:"server"` PubIP string `json:"publicIp" yaml:"publicIp" xml:"publicIp"` CompanyName string `json:"companyName" yaml:"companyName" xml:"companyName"` EnabledRedis bool `json:"enabledRedis" yaml:"enabledRedis" xml:"enabledRedis"` EnabledDb bool `json:"enabledDb" yaml:"enabledDb" xml:"enabledDb"` EnabledMQ bool `json:"enabledMQ" yaml:"enabledMQ" xml:"enabledMQ"` }
Click to show internal directories.
Click to hide internal directories.