fleet/server/service/logging_scheduled_queries.go
Zachary Wasserman 26dc30bd25
Update query and pack interfaces for fleetctl (#1670)
- Add new Apply spec methods for queries and packs
- Remove now extraneous datastore/service methods
- Remove import service (unused, and had many dependencies that this breaks)
- Refactor tests as appropriate
2018-01-03 11:18:05 -08:00

27 lines
547 B
Go

package service
import (
"context"
"time"
"github.com/kolide/fleet/server/kolide"
)
func (mw loggingMiddleware) GetScheduledQueriesInPack(ctx context.Context, id uint, opts kolide.ListOptions) ([]*kolide.ScheduledQuery, error) {
var (
queries []*kolide.ScheduledQuery
err error
)
defer func(begin time.Time) {
_ = mw.logger.Log(
"method", "GetScheduledQueriesInPack",
"err", err,
"took", time.Since(begin),
)
}(time.Now())
queries, err = mw.Service.GetScheduledQueriesInPack(ctx, id, opts)
return queries, err
}