Documentation
¶
Index ¶
- Constants
- func Close(inputs List) error
- type Config
- type Csv
- func (csvInput *Csv) Close() error
- func (csvInput *Csv) Get(position record.Position) (record.Record, error)
- func (csvInput *Csv) IterateAll() (record.Iterator, func() error, error)
- func (csvInput *Csv) ModTime() (time.Time, error)
- func (csvInput *Csv) Name() string
- func (csvInput *Csv) Size() (int64, error)
- type CsvColumnConfig
- type CsvConfig
- type CsvRecord
- type Input
- type Json
- func (jsonInput *Json) Close() error
- func (jsonInput *Json) Get(position record.Position) (record.Record, error)
- func (jsonInput *Json) IterateAll() (record.Iterator, func() error, error)
- func (jsonInput *Json) ModTime() (time.Time, error)
- func (jsonInput *Json) Name() string
- func (jsonInput *Json) Size() (int64, error)
- type JsonConfig
- type JsonRecord
- type List
- type Mock
- func (mock *Mock) Close() error
- func (mock *Mock) Get(position record.Position) (record.Record, error)
- func (mock *Mock) IterateAll() (record.Iterator, func() error, error)
- func (mock *Mock) ModTime() (time.Time, error)
- func (mock *Mock) Name() string
- func (mock *Mock) SetModTime(time time.Time)
- func (mock *Mock) Size() (int64, error)
- type Xml
- func (xmlInput *Xml) Close() error
- func (xmlInput *Xml) Get(position record.Position) (record.Record, error)
- func (xmlInput *Xml) IterateAll() (record.Iterator, func() error, error)
- func (xmlInput *Xml) ModTime() (time.Time, error)
- func (xmlInput *Xml) Name() string
- func (xmlInput *Xml) Size() (int64, error)
- type XmlConfig
- type XmlInputPropertyType
- type XmlPropertyConfig
- type XmlRecord
Constants ¶
View Source
const ( XmlInputPropertyTypePrimitive = XmlInputPropertyType("primitive") XmlInputPropertyTypeArray = XmlInputPropertyType("array") XmlInputPropertyTypeObject = XmlInputPropertyType("object") )
Variables ¶
This section is empty.
Functions ¶
Types ¶
type CsvColumnConfig ¶
type CsvConfig ¶
type CsvConfig struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
Path string `yaml:"path"`
DieOnInputChange *bool `yaml:"dieOnInputChange"`
IgnoreFirstRow bool `yaml:"ignoreFirstRow"`
AutodetectColumns bool `yaml:"autodetectColumns"`
Delimiter string `yaml:"delimiter"`
Columns []*CsvColumnConfig `yaml:"columns"`
ColumnIndexByName map[string]int
Logger *logrus.Entry
}
func (*CsvConfig) ShouldDieOnInputChange ¶
type CsvRecord ¶
type CsvRecord struct {
// contains filtered or unexported fields
}
func NewCsvRecord ¶
func (*CsvRecord) Position ¶
func (record *CsvRecord) Position() recordPackage.Position
type Input ¶
type Input interface {
Name() string
Get(position record.Position) (record.Record, error)
Size() (int64, error)
ModTime() (time.Time, error)
// Iterates all the records in the input, ordered
// from the smallest to the biggest position
// The second returned parameter is a callback that
// must be used to close the relevant resources
IterateAll() (record.Iterator, func() error, error)
Close() error
}
type Json ¶
type Json struct {
// contains filtered or unexported fields
}
func NewJson ¶
func NewJson(config *JsonConfig) (*Json, error)
func (*Json) IterateAll ¶
type JsonConfig ¶
type JsonConfig struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
Path string `yaml:"path"`
DieOnInputChange *bool `yaml:"dieOnInputChange"`
Logger *logrus.Entry
}
func (*JsonConfig) GetName ¶
func (config *JsonConfig) GetName() string
func (*JsonConfig) ShouldDieOnInputChange ¶
func (config *JsonConfig) ShouldDieOnInputChange() bool
type JsonRecord ¶
type JsonRecord struct {
// contains filtered or unexported fields
}
func NewJsonRecord ¶
func NewJsonRecord( config *JsonConfig, data map[string]interface{}, position record.Position, ) *JsonRecord
func (*JsonRecord) All ¶
func (record *JsonRecord) All() (map[string]interface{}, error)
func (*JsonRecord) Get ¶
func (record *JsonRecord) Get(path string) (interface{}, error)
func (*JsonRecord) Position ¶
func (record *JsonRecord) Position() record.Position
type Mock ¶
type Mock struct {
// contains filtered or unexported fields
}
func (*Mock) SetModTime ¶
type XmlConfig ¶
type XmlConfig struct {
Name string `yaml:"name"`
Type string `yaml:"type"`
Path string `yaml:"path"`
DieOnInputChange *bool `yaml:"dieOnInputChange"`
Properties []*XmlPropertyConfig `yaml:"properties"`
RecordXPath string `yaml:"recordXpath"`
Logger *logrus.Entry
}
func (*XmlConfig) ShouldDieOnInputChange ¶
type XmlInputPropertyType ¶
type XmlInputPropertyType string
type XmlPropertyConfig ¶
type XmlPropertyConfig struct {
Name string `yaml:"name"`
Type XmlInputPropertyType `yaml:"type"`
Parser string `yaml:"parser"`
XPath string `yaml:"xpath"`
Items *XmlPropertyConfig `yaml:"items"`
Properties []*XmlPropertyConfig `yaml:"properties"`
CompiledXPath *xpath.Expr
}
type XmlRecord ¶
type XmlRecord struct {
// contains filtered or unexported fields
}
func NewXmlRecord ¶
func NewXmlRecord( config *XmlConfig, node *xmlquery.Node, parsers parserPackage.List, position recordPackage.Position, ) (*XmlRecord, error)
func (*XmlRecord) Position ¶
func (record *XmlRecord) Position() recordPackage.Position
Source Files
¶
Click to show internal directories.
Click to hide internal directories.