Documentation ¶
Index ¶
Constants ¶
View Source
const ( FileTypeYaml = "yaml" FileTypeYml = "yml" )
Variables ¶
This section is empty.
Functions ¶
func InitConfigFromCMD ¶
func InitConfigFromCMD()
Types ¶
type DataSource ¶
type DataSource struct { RDS RDSConf `json:"rds"` Redis RedisConf `json:"redis"` Kafka KafkaConf `json:"kafka"` InfluxDB InfluxDBConf `json:"influxdb"` ElasticSearch ElasticSearchConf `json:"elasticsearch"` }
func GetDatasource ¶
func GetDatasource() DataSource
type ElasticSearchConf ¶
type ElasticSearchConf struct { Hosts []string `json:"hosts,omitempty"` User string `json:"user,omitempty"` Password string `json:"password,omitempty"` }
func GetES ¶
func GetES() ElasticSearchConf
type InfluxDBConf ¶
type InfluxDBConf struct { Host string `json:"host,omitempty"` Port int `json:"port,omitempty"` User string `json:"user,omitempty"` Password string `json:"password,omitempty"` }
func GetInfluxDB ¶
func GetInfluxDB() InfluxDBConf
type InnerConfig ¶
type InnerConfig struct {
DataSource DataSource
}
type Manager ¶
func NewManager ¶
func (*Manager) GetDatasource ¶
func (m *Manager) GetDatasource() DataSource
type Option ¶
func NewDefaultOption ¶
func NewDefaultOption() Option
type OptionFn ¶
type OptionFn func(opt *Option)
func WithConfigList ¶
func WithFileType ¶
func WithoutDatasource ¶
func WithoutDatasource() OptionFn
type RDSConf ¶
type RDSConf struct { Connection RDSConnection `json:"connection"` Database string `json:"database"` Dialect string `json:"dialect"` Debug bool `json:"debug"` }
type RDSConnection ¶
type RDSSetting ¶
Click to show internal directories.
Click to hide internal directories.