telegraf/plugins/inputs/webhooks/filestack/filestack_webhooks_events.go

22 lines
405 B
Go
Raw Normal View History

2016-06-28 17:26:41 +00:00
package filestack
import "strconv"
2016-06-28 17:32:41 +00:00
type FilestackEvent struct {
2016-06-28 17:26:41 +00:00
Action string `json:"action"`
TimeStamp int64 `json:"timestamp"`
Id int `json:"id"`
}
2016-06-28 17:32:41 +00:00
func (fe *FilestackEvent) Tags() map[string]string {
2016-06-28 17:26:41 +00:00
return map[string]string{
2016-06-28 17:32:41 +00:00
"action": fe.Action,
2016-06-28 17:26:41 +00:00
}
}
2016-06-28 17:32:41 +00:00
func (fe *FilestackEvent) Fields() map[string]interface{} {
2016-06-28 17:26:41 +00:00
return map[string]interface{}{
2016-06-28 17:32:41 +00:00
"id": strconv.Itoa(fe.Id),
2016-06-28 17:26:41 +00:00
}
}