2016-12-13 22:22:05 +00:00
|
|
|
package kolide
|
|
|
|
|
|
|
|
import (
|
2017-03-15 15:55:30 +00:00
|
|
|
"context"
|
2016-12-13 22:22:05 +00:00
|
|
|
)
|
|
|
|
|
|
|
|
type ScheduledQueryStore interface {
|
|
|
|
ListScheduledQueriesInPack(id uint, opts ListOptions) ([]*ScheduledQuery, error)
|
|
|
|
}
|
|
|
|
|
|
|
|
type ScheduledQueryService interface {
|
2017-01-10 04:40:21 +00:00
|
|
|
GetScheduledQueriesInPack(ctx context.Context, id uint, opts ListOptions) (queries []*ScheduledQuery, err error)
|
2016-12-13 22:22:05 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
type ScheduledQuery struct {
|
|
|
|
UpdateCreateTimestamps
|
|
|
|
DeleteFields
|
2018-01-03 19:18:05 +00:00
|
|
|
ID uint `json:"id"`
|
|
|
|
PackID uint `json:"pack_id" db:"pack_id"`
|
|
|
|
Name string `json:"name"`
|
2018-01-10 19:38:20 +00:00
|
|
|
QueryID uint `json:"query_id" db:"query_id"`
|
2018-01-03 19:18:05 +00:00
|
|
|
QueryName string `json:"query_name" db:"query_name"`
|
|
|
|
Query string `json:"query"` // populated via a join on queries
|
|
|
|
Description string `json:"description"`
|
|
|
|
Interval uint `json:"interval"`
|
|
|
|
Snapshot *bool `json:"snapshot"`
|
|
|
|
Removed *bool `json:"removed"`
|
|
|
|
Platform *string `json:"platform"`
|
|
|
|
Version *string `json:"version"`
|
|
|
|
Shard *uint `json:"shard"`
|
2016-12-13 22:22:05 +00:00
|
|
|
}
|
2017-02-13 21:31:22 +00:00
|
|
|
|
|
|
|
type ScheduledQueryPayload struct {
|
|
|
|
PackID *uint `json:"pack_id"`
|
|
|
|
QueryID *uint `json:"query_id"`
|
|
|
|
Interval *uint `json:"interval"`
|
|
|
|
Snapshot *bool `json:"snapshot"`
|
|
|
|
Removed *bool `json:"removed"`
|
|
|
|
Platform *string `json:"platform"`
|
|
|
|
Version *string `json:"version"`
|
|
|
|
Shard *uint `json:"shard"`
|
|
|
|
}
|