Documentation
¶
Index ¶
- Constants
- type Env
- type IchubConfig
- func (this *IchubConfig) CheckFileExist() bool
- func (this *IchubConfig) FullFileName() string
- func (this *IchubConfig) Log()
- func (this *IchubConfig) LogFileName()
- func (this *IchubConfig) ParseValue(key string, value string) string
- func (this *IchubConfig) ParseValues(key string, values ...*string)
- func (this *IchubConfig) Read() *IchubConfig
- func (this *IchubConfig) ReadConfig(basePath string)
- func (this *IchubConfig) ReadIchubCommon() *IchubConfig
- func (this *IchubConfig) ReadIchubDatasource() *baseconfig.DbClientDto
- func (this *IchubConfig) ReadIchubDb() *baseconfig.DbClientDto
- func (this *IchubConfig) ReadIchubEs() *baseconfig.ElasticClientDto
- func (this *IchubConfig) ReadIchubMysql() *baseconfig.DbClientDto
- func (this *IchubConfig) ReadIchubRedis() *baseconfig.RedisClientDto
- func (this *IchubConfig) ReadIchubRpc() *baseconfig.RpcServerDto
- func (this *IchubConfig) ReadIchubWebClient() (clientDto *baseconfig.WebClientDto)
- func (this *IchubConfig) ReadIchubWebServer() (serverDto *baseconfig.WebServerDto)
- func (this *IchubConfig) ReadWebSwagger() *baseconfig.SwaggerClientDto
- func (this *IchubConfig) SetDefaultBasePath(basepath string)
- func (this *IchubConfig) SetOsEnv(key, value string) *IchubConfig
Constants ¶
View Source
const ConfigfileIchubCommon = "/config/ichubcommon.yml"
View Source
const ConfigfileIchubdemo = "/config/ichubengine-demo.yml"
View Source
const ConfigfileIchubengine = "/config/ichubengine.yml"
View Source
const ConfigfileIchubfactroy = "/config/factroy/ichubfactroy.yml"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type IchubConfig ¶
type IchubConfig struct {
basedto.BaseEntity
Env string `json:"env"`
BasePath string `json:"base_path"`
ConfigFile string `json:"config_file"`
Etcd struct {
Server struct {
Hosturl string `json:"hosturl"`
}
}
Rpc struct {
ServerName string `json:"server_name"`
ServerPort int `json:"server_port"`
ClientName string `json:"client_name"`
}
Web struct {
Server struct {
Name string `json:"name"`
Port int `json:"port"`
}
Client struct {
Name string `json:"name"`
TestUrl string `json:"test_url"`
}
Swagger struct {
Host string `json:"host"`
BasePath string `json:"base_path"`
Version string `json:"version"`
Title string `json:"title"`
Enable string `json:"enable"`
}
}
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"`
Nats struct {
Url string `json:"url"`
}
Es struct {
Url string `json:"url"`
Username string `json:"username,omitempty"`
Password string `json:"password,omitempty"`
}
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"`
}
Dbtype string `json:"dbtype"`
// contains filtered or unexported fields
}
func New ¶
func New(configFile string) *IchubConfig
func NewCommon ¶
func NewCommon() *IchubConfig
func NewConfig ¶
func NewConfig() *IchubConfig
func (*IchubConfig) CheckFileExist ¶
func (this *IchubConfig) CheckFileExist() bool
func (*IchubConfig) FullFileName ¶
func (this *IchubConfig) FullFileName() string
func (*IchubConfig) Log ¶
func (this *IchubConfig) Log()
func (*IchubConfig) LogFileName ¶
func (this *IchubConfig) LogFileName()
func (*IchubConfig) ParseValue ¶
func (this *IchubConfig) ParseValue(key string, value string) string
func (*IchubConfig) ParseValues ¶
func (this *IchubConfig) ParseValues(key string, values ...*string)
func (*IchubConfig) Read ¶
func (this *IchubConfig) Read() *IchubConfig
func (*IchubConfig) ReadConfig ¶
func (this *IchubConfig) ReadConfig(basePath string)
func (*IchubConfig) ReadIchubCommon ¶
func (this *IchubConfig) ReadIchubCommon() *IchubConfig
func (*IchubConfig) ReadIchubDatasource ¶
func (this *IchubConfig) ReadIchubDatasource() *baseconfig.DbClientDto
func (*IchubConfig) ReadIchubDb ¶
func (this *IchubConfig) ReadIchubDb() *baseconfig.DbClientDto
func (*IchubConfig) ReadIchubEs ¶
func (this *IchubConfig) ReadIchubEs() *baseconfig.ElasticClientDto
func (*IchubConfig) ReadIchubMysql ¶
func (this *IchubConfig) ReadIchubMysql() *baseconfig.DbClientDto
func (*IchubConfig) ReadIchubRedis ¶
func (this *IchubConfig) ReadIchubRedis() *baseconfig.RedisClientDto
func (*IchubConfig) ReadIchubRpc ¶
func (this *IchubConfig) ReadIchubRpc() *baseconfig.RpcServerDto
func (*IchubConfig) ReadIchubWebClient ¶
func (this *IchubConfig) ReadIchubWebClient() (clientDto *baseconfig.WebClientDto)
func (*IchubConfig) ReadIchubWebServer ¶
func (this *IchubConfig) ReadIchubWebServer() (serverDto *baseconfig.WebServerDto)
func (*IchubConfig) ReadWebSwagger ¶
func (this *IchubConfig) ReadWebSwagger() *baseconfig.SwaggerClientDto
func (*IchubConfig) SetDefaultBasePath ¶
func (this *IchubConfig) SetDefaultBasePath(basepath string)
func (*IchubConfig) SetOsEnv ¶
func (this *IchubConfig) SetOsEnv(key, value string) *IchubConfig
Click to show internal directories.
Click to hide internal directories.