mirror of
https://github.com/empayre/fleet.git
synced 2024-11-07 01:15:22 +00:00
0b7747bef0
Replaces (and appropriately refactors) a number of endpoints that were removed long ago when we decided to kill the UI with the fleetctl release. We turned out not to do this, and now need to restore these missing endpoints. This is not a straight up replacement of the existing code because of refactoring to the DB schemas that was also done in the migration. Most of the replaced code was removed in #1670 and #1686. Fixes #1811, fixes #1810
60 lines
2.0 KiB
Go
60 lines
2.0 KiB
Go
// Automatically generated by mockimpl. DO NOT EDIT!
|
|
|
|
package mock
|
|
|
|
import "github.com/kolide/fleet/server/kolide"
|
|
|
|
var _ kolide.ScheduledQueryStore = (*ScheduledQueryStore)(nil)
|
|
|
|
type ListScheduledQueriesInPackFunc func(id uint, opts kolide.ListOptions) ([]*kolide.ScheduledQuery, error)
|
|
|
|
type NewScheduledQueryFunc func(sq *kolide.ScheduledQuery, opts ...kolide.OptionalArg) (*kolide.ScheduledQuery, error)
|
|
|
|
type SaveScheduledQueryFunc func(sq *kolide.ScheduledQuery) (*kolide.ScheduledQuery, error)
|
|
|
|
type DeleteScheduledQueryFunc func(id uint) error
|
|
|
|
type ScheduledQueryFunc func(id uint) (*kolide.ScheduledQuery, error)
|
|
|
|
type ScheduledQueryStore struct {
|
|
ListScheduledQueriesInPackFunc ListScheduledQueriesInPackFunc
|
|
ListScheduledQueriesInPackFuncInvoked bool
|
|
|
|
NewScheduledQueryFunc NewScheduledQueryFunc
|
|
NewScheduledQueryFuncInvoked bool
|
|
|
|
SaveScheduledQueryFunc SaveScheduledQueryFunc
|
|
SaveScheduledQueryFuncInvoked bool
|
|
|
|
DeleteScheduledQueryFunc DeleteScheduledQueryFunc
|
|
DeleteScheduledQueryFuncInvoked bool
|
|
|
|
ScheduledQueryFunc ScheduledQueryFunc
|
|
ScheduledQueryFuncInvoked bool
|
|
}
|
|
|
|
func (s *ScheduledQueryStore) ListScheduledQueriesInPack(id uint, opts kolide.ListOptions) ([]*kolide.ScheduledQuery, error) {
|
|
s.ListScheduledQueriesInPackFuncInvoked = true
|
|
return s.ListScheduledQueriesInPackFunc(id, opts)
|
|
}
|
|
|
|
func (s *ScheduledQueryStore) NewScheduledQuery(sq *kolide.ScheduledQuery, opts ...kolide.OptionalArg) (*kolide.ScheduledQuery, error) {
|
|
s.NewScheduledQueryFuncInvoked = true
|
|
return s.NewScheduledQueryFunc(sq, opts...)
|
|
}
|
|
|
|
func (s *ScheduledQueryStore) SaveScheduledQuery(sq *kolide.ScheduledQuery) (*kolide.ScheduledQuery, error) {
|
|
s.SaveScheduledQueryFuncInvoked = true
|
|
return s.SaveScheduledQueryFunc(sq)
|
|
}
|
|
|
|
func (s *ScheduledQueryStore) DeleteScheduledQuery(id uint) error {
|
|
s.DeleteScheduledQueryFuncInvoked = true
|
|
return s.DeleteScheduledQueryFunc(id)
|
|
}
|
|
|
|
func (s *ScheduledQueryStore) ScheduledQuery(id uint) (*kolide.ScheduledQuery, error) {
|
|
s.ScheduledQueryFuncInvoked = true
|
|
return s.ScheduledQueryFunc(id)
|
|
}
|