Vendor main dependencies.
This commit is contained in:
parent
49a09ab7dd
commit
dd5e3fba01
2738 changed files with 1045689 additions and 0 deletions
38
vendor/gopkg.in/ns1/ns1-go.v2/rest/model/data/feed.go
generated
vendored
Normal file
38
vendor/gopkg.in/ns1/ns1-go.v2/rest/model/data/feed.go
generated
vendored
Normal file
|
@ -0,0 +1,38 @@
|
|||
package data
|
||||
|
||||
// Destination is the target resource the receives data from a feed/source.
|
||||
type Destination struct {
|
||||
ID string `json:"destid"`
|
||||
|
||||
// All destinations must point to a record.
|
||||
RecordID string `json:"record"`
|
||||
|
||||
// Type is the 'level' at which to apply the filters(on the targeted record).
|
||||
// Options:
|
||||
// - answer (highest precedence)
|
||||
// - region
|
||||
// - record (lowest precendence)
|
||||
Type string `json:"desttype"`
|
||||
|
||||
SourceID string `json:"-"`
|
||||
}
|
||||
|
||||
// NewDestination returns an empty feed destination.
|
||||
func NewDestination() *Destination {
|
||||
return &Destination{}
|
||||
}
|
||||
|
||||
// Feed wraps an NS1 /data/feeds resource
|
||||
type Feed struct {
|
||||
ID string `json:"id,omitempty"`
|
||||
Name string `json:"name"`
|
||||
Config Config `json:"config,omitempty"`
|
||||
Data Meta `json:"data,omitempty"`
|
||||
|
||||
SourceID string
|
||||
}
|
||||
|
||||
// NewFeed returns a data feed with given name and config.
|
||||
func NewFeed(name string, cfg Config) *Feed {
|
||||
return &Feed{Name: name, Config: cfg}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue