mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
f109b14f9d
* Moving query attributes from the query object to the pack-query relationship * some additional tests * http request parsing test * QueryOptions in new test_util code * initial scaffolding of new request structures * service and datastore * test outline * l2 merge conflict scrub * service tests for scheduled query service * service and datastore tests * most endpoints and transports * order of values are not deterministic with inmem * transport tests * rename PackQuery to ScheduledQuery * removing existing implementation of adding queries to packs * accounting for the new argument to NewQuery * fix alignment in sql query * removing underscore * add removed to the datastore * removed differential from the schema
27 lines
870 B
Go
27 lines
870 B
Go
package service
|
|
|
|
import (
|
|
"github.com/kolide/kolide-ose/server/kolide"
|
|
"golang.org/x/net/context"
|
|
)
|
|
|
|
func (svc service) GetScheduledQuery(ctx context.Context, id uint) (*kolide.ScheduledQuery, error) {
|
|
return svc.ds.ScheduledQuery(id)
|
|
}
|
|
|
|
func (svc service) GetScheduledQueriesInPack(ctx context.Context, id uint, opts kolide.ListOptions) ([]*kolide.ScheduledQuery, error) {
|
|
return svc.ds.ListScheduledQueriesInPack(id, opts)
|
|
}
|
|
|
|
func (svc service) ScheduleQuery(ctx context.Context, sq *kolide.ScheduledQuery) (*kolide.ScheduledQuery, error) {
|
|
return svc.ds.NewScheduledQuery(sq)
|
|
}
|
|
|
|
func (svc service) ModifyScheduledQuery(ctx context.Context, sq *kolide.ScheduledQuery) (*kolide.ScheduledQuery, error) {
|
|
return svc.ds.SaveScheduledQuery(sq)
|
|
}
|
|
|
|
func (svc service) DeleteScheduledQuery(ctx context.Context, id uint) error {
|
|
return svc.ds.DeleteScheduledQuery(id)
|
|
}
|