package
Version:
v1.0.2
Opens a new window with list of versions in this module.
Published: Jan 31, 2022
License: Apache-2.0
Opens a new window with license information.
Imports: 5
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
type ElasticConfig struct {
Url string `yaml:"url"`
User string `yaml:"user"`
Password string `yaml:"password"`
CaCertPath string `yaml:"caCertPath"`
NumWorker int `yaml:"numWorker"`
}
type Field struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
}
type IReader interface {
ReadConfig() ([]byte, error)
}
Defining an interface so that functionality of 'readConfig()' can be mocked
type ImportConfig struct {
PollingSeconds int `yaml:"pollingSeconds"`
Database string `yaml:"database"`
Queries []QueryModel `yaml:"queries"`
Elastic ElasticConfig `yaml:"elastic"`
}
type JSONField struct {
FieldName string `yaml:"fieldName"`
Fields []Field `yaml:"fields"`
}
type QueryModel struct {
Index string `yaml:"index"`
Query string `yaml:"query"`
UpdateDate string `yaml:"updateDate"`
Fields []Field `yaml:"fields"`
JSONFields []JSONField `yaml:"JSONFields"`
Id string `yaml:"id"`
}
type Reader struct {
FileName string
}
'reader' implementing the Interface
Function to read from actual file
Source Files
¶
Click to show internal directories.
Click to hide internal directories.