Documentation
¶
Index ¶
- Constants
- func InjectIchubConfig(s *IchubConfig)
- func LoadIchubConfig() baseiface.ISingleton
- type IchubConfig
- func (self *IchubConfig) ChangeDbType(dbtype string) string
- func (self *IchubConfig) Check() error
- func (self *IchubConfig) CheckEnvFileExist() bool
- func (self *IchubConfig) CheckFileExist() bool
- func (self *IchubConfig) CheckSoftwareEnv()
- func (self *IchubConfig) EnvFileName() string
- func (self *IchubConfig) From(that *IchubConfig)
- func (self *IchubConfig) FullFileName() string
- func (self *IchubConfig) IfUseCommon() bool
- func (self *IchubConfig) Log()
- func (self *IchubConfig) LogFileName()
- func (self *IchubConfig) ParseRealFileName() string
- func (self *IchubConfig) Read() *IchubConfig
- func (self *IchubConfig) ReadCommon(cfile string) (*IchubConfig, error)
- func (self *IchubConfig) ReadCommonConfig() (*IchubConfig, error)
- func (self *IchubConfig) ReadConfig(basePath string) error
- func (self *IchubConfig) ReadConfigBase(env ...string)
- func (self *IchubConfig) ReadConfigEnv() string
- func (self *IchubConfig) ReadDbWebClient() (clientDto *baseconfig.WebClientDto)
- func (self *IchubConfig) ReadDefault() *IchubConfig
- func (self *IchubConfig) ReadDev() *IchubConfig
- func (self *IchubConfig) ReadEnc() *IchubConfig
- func (self *IchubConfig) ReadEnv() string
- func (self *IchubConfig) ReadEsWebClient() (clientDto *baseconfig.WebClientDto)
- func (self *IchubConfig) ReadIchubCmsDb() *baseconfig.DbClientDto
- func (self *IchubConfig) ReadIchubDatasource() *baseconfig.DbClientDto
- func (self *IchubConfig) ReadIchubDb() *baseconfig.DbClientDto
- func (self *IchubConfig) ReadIchubDbMeidusa() *baseconfig.DbClientDto
- func (self *IchubConfig) ReadIchubEs() *baseconfig.ElasticClientDto
- func (self *IchubConfig) ReadIchubFactroy() baseconfig.FactroyClientDto
- func (self *IchubConfig) ReadIchubGorm() *baseconfig.GormClientDto
- func (self *IchubConfig) ReadIchubHubDb() *baseconfig.DbClientDto
- func (self *IchubConfig) ReadIchubMedusa() *baseconfig.DbClientDto
- func (self *IchubConfig) ReadIchubMysql() *baseconfig.DbClientDto
- func (self *IchubConfig) ReadIchubRedis() *baseconfig.RedisClientDto
- func (self *IchubConfig) ReadIchubRpc() *baseconfig.RpcServerDto
- func (self *IchubConfig) ReadIchubWebClient() (clientDto *baseconfig.WebClientDto)
- func (self *IchubConfig) ReadIchubWebServer() (serverDto *baseconfig.WebServerDto)
- func (self *IchubConfig) ReadInt(pathkey string) int
- func (self *IchubConfig) ReadMap(pathkey string) map[string]interface{}
- func (self *IchubConfig) ReadMaster() *IchubConfig
- func (self *IchubConfig) ReadNats() *baseconfig.NatsClientDto
- func (self *IchubConfig) ReadRelease() *IchubConfig
- func (self *IchubConfig) ReadRuleWebClient() (clientDto *baseconfig.WebClientDto)
- func (self *IchubConfig) ReadSoftware() *baseconfig.SoftwareDto
- func (self *IchubConfig) ReadStatWebClient() (clientDto *baseconfig.WebClientDto)
- func (self *IchubConfig) ReadString(pathkey string) string
- func (self *IchubConfig) ReadStruct(pathkey string, object interface{})
- func (self *IchubConfig) ReadTest() *IchubConfig
- func (self *IchubConfig) ReadVar(pathkey string) interface{}
- func (self *IchubConfig) ReadVar2Db(key string) *baseconfig.DbClientDto
- func (self *IchubConfig) ReadVar2Rpc(key string) *baseconfig.RpcServerDto
- func (self *IchubConfig) ReadVar2WebClient(key string) *baseconfig.WebClientDto
- func (self *IchubConfig) ReadWebSwagger() *baseconfig.SwaggerClientDto
- func (self *IchubConfig) ReadWso2agentWebClient() (clientDto *baseconfig.WebClientDto)
- func (self *IchubConfig) SetDefaultBasePath(basepath string)
- func (self *IchubConfig) SetOsEnv(key, value string) *IchubConfig
- func (self *IchubConfig) Single() bool
- func (self *IchubConfig) ToEnc() *IchubConfig
- func (self *IchubConfig) ToEncString() string
- type WebClient
Constants ¶
View Source
const ConfigfileIchubCommon = "/config/ichub-common.yml"
View Source
const ConfigfileIchubEnv = "/config/env.yml"
View Source
const ConfigfileIchubengine = "/config/ichub.yml"
Variables ¶
This section is empty.
Functions ¶
func InjectIchubConfig ¶
func InjectIchubConfig(s *IchubConfig)
func LoadIchubConfig ¶
func LoadIchubConfig() baseiface.ISingleton
Types ¶
type IchubConfig ¶
type IchubConfig struct { baseconfig.IchubClientDto Env string `json:"env"` UseCommon string `json:"useCommon"` BasePath string `json:"base_path"` EnvConfigFile string `json:"env_config_file"` ConfigFile string `json:"config_file"` RealConfigFile string `json:"real_config_file"` //config items Software baseconfig.SoftwareDto `json:"software"` Natscli baseconfig.NatsClientDto `json:"nats"` Etcd struct { Server struct { Hosturl string `json:"hosturl"` } } Rpc struct { ServerName string `json:"servername"` Version string `json:"version"` ServerPort string `json:"serverport"` ClientName string `json:"-"` } Web struct { Server struct { Name string `json:"name"` Port int `json:"port"` Ver string `json:"ver"` Backend string `json:"backend"` } Client WebClient `json:"client"` Swagger baseconfig.SwaggerClientDto `json:"swagger"` Wso2agent WebClient `json:"wso2agent"` Dbclient WebClient `json:"dbclient"` Esclient WebClient `json:"esclient"` Ruleclient WebClient `json:"ruleclient"` Statclient WebClient `json:"statclient"` } `json:"web,omitempty"` Es struct { Enable string `json:"enable"` Url string `json:"url"` Username string `json:"username,omitempty"` Password string `json:"password,omitempty"` SniffEnabled string `json:"sniffEnabled"` // false 是否设置嗅探器 HealthcheckInterval int `json:"healthcheckInterval"` // 10s } Gorm baseconfig.GormClientDto Datasource struct { Dbtype string `json:"dbtype"` Dbname string `json:"dbname"` Host string `json:"host"` Port string `json:"port"` Username string `json:"username"` Password string `json:"password"` Sslmode string `json:"sslmode"` Charset string `json:"charset"` } Redis struct { Db int `json:"db"` Addr string `json:"addr"` Password string `json:"password"` } `json:"redis"` Medusa *baseconfig.DbClientDto `json:"medusa"` Mysql struct { Dbtype string `json:"dbtype"` Dbname string `json:"dbname"` Host string `json:"host"` Port string `json:"port"` Username string `json:"username"` Password string `json:"password"` Sslmode string `json:"sslmode"` Charset string `json:"charset"` } `json:"mysql"` Ipfs baseconfig.IpfsDto `json:"ipfs"` Factroy baseconfig.FactroyClientDto // contains filtered or unexported fields }
统一配置文件处理
func Default ¶
func Default() *IchubConfig
func FindBeanIchubConfig ¶
func FindBeanIchubConfig() *IchubConfig
func New ¶
func New(configFile string) *IchubConfig
func NewCommon ¶
func NewCommon() *IchubConfig
func NewConfig ¶
func NewConfig() *IchubConfig
func (*IchubConfig) ChangeDbType ¶
func (self *IchubConfig) ChangeDbType(dbtype string) string
change dbtype return cfg dbtype
func (*IchubConfig) Check ¶
func (self *IchubConfig) Check() error
func (*IchubConfig) CheckEnvFileExist ¶
func (self *IchubConfig) CheckEnvFileExist() bool
func (*IchubConfig) CheckFileExist ¶
func (self *IchubConfig) CheckFileExist() bool
func (*IchubConfig) CheckSoftwareEnv ¶
func (self *IchubConfig) CheckSoftwareEnv()
func (*IchubConfig) EnvFileName ¶
func (self *IchubConfig) EnvFileName() string
func (*IchubConfig) From ¶
func (self *IchubConfig) From(that *IchubConfig)
func (*IchubConfig) FullFileName ¶
func (self *IchubConfig) FullFileName() string
func (*IchubConfig) IfUseCommon ¶
func (self *IchubConfig) IfUseCommon() bool
func (*IchubConfig) Log ¶
func (self *IchubConfig) Log()
func (*IchubConfig) LogFileName ¶
func (self *IchubConfig) LogFileName()
func (*IchubConfig) ParseRealFileName ¶
func (self *IchubConfig) ParseRealFileName() string
func (*IchubConfig) Read ¶
func (self *IchubConfig) Read() *IchubConfig
func (*IchubConfig) ReadCommon ¶
func (self *IchubConfig) ReadCommon(cfile string) (*IchubConfig, error)
func (*IchubConfig) ReadCommonConfig ¶
func (self *IchubConfig) ReadCommonConfig() (*IchubConfig, error)
func (*IchubConfig) ReadConfig ¶
func (self *IchubConfig) ReadConfig(basePath string) error
func (*IchubConfig) ReadConfigBase ¶
func (self *IchubConfig) ReadConfigBase(env ...string)
func (*IchubConfig) ReadConfigEnv ¶
func (self *IchubConfig) ReadConfigEnv() string
func (*IchubConfig) ReadDbWebClient ¶
func (self *IchubConfig) ReadDbWebClient() (clientDto *baseconfig.WebClientDto)
func (*IchubConfig) ReadDefault ¶
func (self *IchubConfig) ReadDefault() *IchubConfig
func (*IchubConfig) ReadDev ¶
func (self *IchubConfig) ReadDev() *IchubConfig
func (*IchubConfig) ReadEnc ¶
func (self *IchubConfig) ReadEnc() *IchubConfig
func (*IchubConfig) ReadEnv ¶
func (self *IchubConfig) ReadEnv() string
func (*IchubConfig) ReadEsWebClient ¶
func (self *IchubConfig) ReadEsWebClient() (clientDto *baseconfig.WebClientDto)
func (*IchubConfig) ReadIchubCmsDb ¶
func (self *IchubConfig) ReadIchubCmsDb() *baseconfig.DbClientDto
func (*IchubConfig) ReadIchubDatasource ¶
func (self *IchubConfig) ReadIchubDatasource() *baseconfig.DbClientDto
func (*IchubConfig) ReadIchubDb ¶
func (self *IchubConfig) ReadIchubDb() *baseconfig.DbClientDto
func (*IchubConfig) ReadIchubDbMeidusa ¶
func (self *IchubConfig) ReadIchubDbMeidusa() *baseconfig.DbClientDto
func (*IchubConfig) ReadIchubEs ¶
func (self *IchubConfig) ReadIchubEs() *baseconfig.ElasticClientDto
func (*IchubConfig) ReadIchubFactroy ¶
func (self *IchubConfig) ReadIchubFactroy() baseconfig.FactroyClientDto
func (*IchubConfig) ReadIchubGorm ¶
func (self *IchubConfig) ReadIchubGorm() *baseconfig.GormClientDto
func (*IchubConfig) ReadIchubHubDb ¶
func (self *IchubConfig) ReadIchubHubDb() *baseconfig.DbClientDto
func (*IchubConfig) ReadIchubMedusa ¶
func (self *IchubConfig) ReadIchubMedusa() *baseconfig.DbClientDto
func (*IchubConfig) ReadIchubMysql ¶
func (self *IchubConfig) ReadIchubMysql() *baseconfig.DbClientDto
func (*IchubConfig) ReadIchubRedis ¶
func (self *IchubConfig) ReadIchubRedis() *baseconfig.RedisClientDto
func (*IchubConfig) ReadIchubRpc ¶
func (self *IchubConfig) ReadIchubRpc() *baseconfig.RpcServerDto
func (*IchubConfig) ReadIchubWebClient ¶
func (self *IchubConfig) ReadIchubWebClient() (clientDto *baseconfig.WebClientDto)
func (*IchubConfig) ReadIchubWebServer ¶
func (self *IchubConfig) ReadIchubWebServer() (serverDto *baseconfig.WebServerDto)
func (*IchubConfig) ReadInt ¶
func (self *IchubConfig) ReadInt(pathkey string) int
func (*IchubConfig) ReadMap ¶
func (self *IchubConfig) ReadMap(pathkey string) map[string]interface{}
func (*IchubConfig) ReadMaster ¶
func (self *IchubConfig) ReadMaster() *IchubConfig
func (*IchubConfig) ReadNats ¶
func (self *IchubConfig) ReadNats() *baseconfig.NatsClientDto
func (*IchubConfig) ReadRelease ¶
func (self *IchubConfig) ReadRelease() *IchubConfig
func (*IchubConfig) ReadRuleWebClient ¶
func (self *IchubConfig) ReadRuleWebClient() (clientDto *baseconfig.WebClientDto)
func (*IchubConfig) ReadSoftware ¶
func (self *IchubConfig) ReadSoftware() *baseconfig.SoftwareDto
func (*IchubConfig) ReadStatWebClient ¶
func (self *IchubConfig) ReadStatWebClient() (clientDto *baseconfig.WebClientDto)
func (*IchubConfig) ReadString ¶
func (self *IchubConfig) ReadString(pathkey string) string
func (*IchubConfig) ReadStruct ¶
func (self *IchubConfig) ReadStruct(pathkey string, object interface{})
"key1.key"
func (*IchubConfig) ReadTest ¶
func (self *IchubConfig) ReadTest() *IchubConfig
func (*IchubConfig) ReadVar ¶
func (self *IchubConfig) ReadVar(pathkey string) interface{}
func (*IchubConfig) ReadVar2Db ¶
func (self *IchubConfig) ReadVar2Db(key string) *baseconfig.DbClientDto
func (*IchubConfig) ReadVar2Rpc ¶
func (self *IchubConfig) ReadVar2Rpc(key string) *baseconfig.RpcServerDto
func (*IchubConfig) ReadVar2WebClient ¶
func (self *IchubConfig) ReadVar2WebClient(key string) *baseconfig.WebClientDto
func (*IchubConfig) ReadWebSwagger ¶
func (self *IchubConfig) ReadWebSwagger() *baseconfig.SwaggerClientDto
func (*IchubConfig) ReadWso2agentWebClient ¶
func (self *IchubConfig) ReadWso2agentWebClient() (clientDto *baseconfig.WebClientDto)
func (*IchubConfig) SetDefaultBasePath ¶
func (self *IchubConfig) SetDefaultBasePath(basepath string)
func (*IchubConfig) SetOsEnv ¶
func (self *IchubConfig) SetOsEnv(key, value string) *IchubConfig
func (*IchubConfig) Single ¶
func (self *IchubConfig) Single() bool
func (*IchubConfig) ToEnc ¶
func (self *IchubConfig) ToEnc() *IchubConfig
func (*IchubConfig) ToEncString ¶
func (self *IchubConfig) ToEncString() string
Click to show internal directories.
Click to hide internal directories.