overflow_commons_go/modules/config/model/Config.go

55 lines
1.4 KiB
Go
Raw Normal View History

2017-11-09 09:02:37 +00:00
package model
type Connection struct {
Ip string `json:"ip,omitempty"`
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 {
Id string `json:"id,omitempty"`
Target Target `json:"target,omitempty"`
Schedule Schedule `json:"schedule,omitempty"`
Crawler Crawler `json:"crawler,omitempty"`
Items []Item `json:"items,omitempty"`
}