fleet/server/mock/datastore_decorators.go
Zachary Wasserman d7cd91c0e4 Retrieve and store host checkin intervals (#1473)
We now track the `config_tls_refresh`, `distributed_interval` and
`logger_tls_period` flag values for each host. Each value is updated by a
detail query agains the `osquery_flags` table, because they may be specified
outside of Kolide. The flags that can be specified within Kolide are also
updated when a config is returned to the host that changes their value.

This will enable us to do a more accurate per-host online status calculation as
discussed in #1419.
2017-04-06 11:55:24 -07:00

60 lines
1.6 KiB
Go

// Automatically generated by mockimpl. DO NOT EDIT!
package mock
import "github.com/kolide/kolide/server/kolide"
var _ kolide.DecoratorStore = (*DecoratorStore)(nil)
type NewDecoratorFunc func(decorator *kolide.Decorator) (*kolide.Decorator, error)
type DeleteDecoratorFunc func(id uint) error
type DecoratorFunc func(id uint) (*kolide.Decorator, error)
type ListDecoratorsFunc func() ([]*kolide.Decorator, error)
type SaveDecoratorFunc func(dec *kolide.Decorator) error
type DecoratorStore struct {
NewDecoratorFunc NewDecoratorFunc
NewDecoratorFuncInvoked bool
DeleteDecoratorFunc DeleteDecoratorFunc
DeleteDecoratorFuncInvoked bool
DecoratorFunc DecoratorFunc
DecoratorFuncInvoked bool
ListDecoratorsFunc ListDecoratorsFunc
ListDecoratorsFuncInvoked bool
SaveDecoratorFunc SaveDecoratorFunc
SaveDecoratorFuncInvoked bool
}
func (s *DecoratorStore) NewDecorator(decorator *kolide.Decorator) (*kolide.Decorator, error) {
s.NewDecoratorFuncInvoked = true
return s.NewDecoratorFunc(decorator)
}
func (s *DecoratorStore) DeleteDecorator(id uint) error {
s.DeleteDecoratorFuncInvoked = true
return s.DeleteDecoratorFunc(id)
}
func (s *DecoratorStore) Decorator(id uint) (*kolide.Decorator, error) {
s.DecoratorFuncInvoked = true
return s.DecoratorFunc(id)
}
func (s *DecoratorStore) ListDecorators() ([]*kolide.Decorator, error) {
s.ListDecoratorsFuncInvoked = true
return s.ListDecoratorsFunc()
}
func (s *DecoratorStore) SaveDecorator(dec *kolide.Decorator) error {
s.SaveDecoratorFuncInvoked = true
return s.SaveDecoratorFunc(dec)
}