2017-11-09 09:02:37 +00:00
|
|
|
package model
|
|
|
|
|
|
|
|
type Connection struct {
|
2017-12-01 06:04:31 +00:00
|
|
|
IP string `json:"ip,omitempty"`
|
2017-11-09 09:02:37 +00:00
|
|
|
Port string `json:"port,omitempty"`
|
|
|
|
PortType string `json:"portType,omitempty"`
|
|
|
|
SSL bool `json:"ssl,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Target struct {
|
|
|
|
Auth map[string]interface{} `json:"auth,omitempty"`
|
|
|
|
Connection Connection `json:"connection,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Schedule struct {
|
|
|
|
Interval string `json:"interval,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Keys struct {
|
|
|
|
Metric string `json:"metric,omitempty"`
|
|
|
|
Key string `json:"key,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type QueryInfo struct {
|
|
|
|
Query string `json:"query,omitempty"`
|
|
|
|
Extend map[string]interface{} `json:"extend,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type MappingInfo struct {
|
|
|
|
ParseDirection string `json:"parseDirection,omitempty"`
|
|
|
|
ArrayColumns []string `json:"arrayColumns,omitempty"`
|
|
|
|
KeyColumns []string `json:"keyColumns,omitempty"`
|
|
|
|
ValueColumn string `json:"valueColumn,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Item struct {
|
|
|
|
Keys []Keys `json:"keys,omitempty"`
|
|
|
|
QueryInfo QueryInfo `json:"queryInfo,omitempty"`
|
|
|
|
MappingInfo MappingInfo `json:"mappingInfo,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Crawler struct {
|
|
|
|
Name string `json:"name,omitempty"`
|
|
|
|
Container string `json:"container,omitempty"`
|
|
|
|
}
|
|
|
|
|
|
|
|
type Config struct {
|
2017-12-01 06:04:31 +00:00
|
|
|
ID string `json:"id,omitempty"`
|
2017-11-09 09:02:37 +00:00
|
|
|
Target Target `json:"target,omitempty"`
|
|
|
|
Schedule Schedule `json:"schedule,omitempty"`
|
|
|
|
Crawler Crawler `json:"crawler,omitempty"`
|
|
|
|
Items []Item `json:"items,omitempty"`
|
|
|
|
}
|