fleet/server/mock/datastore_options.go
2017-06-22 15:50:45 -04:00

70 lines
1.9 KiB
Go

// Automatically generated by mockimpl. DO NOT EDIT!
package mock
import "github.com/kolide/fleet/server/kolide"
var _ kolide.OptionStore = (*OptionStore)(nil)
type SaveOptionsFunc func(opts []kolide.Option, args ...kolide.OptionalArg) error
type ListOptionsFunc func() ([]kolide.Option, error)
type OptionFunc func(id uint) (*kolide.Option, error)
type OptionByNameFunc func(name string, args ...kolide.OptionalArg) (*kolide.Option, error)
type GetOsqueryConfigOptionsFunc func() (map[string]interface{}, error)
type ResetOptionsFunc func() ([]kolide.Option, error)
type OptionStore struct {
SaveOptionsFunc SaveOptionsFunc
SaveOptionsFuncInvoked bool
ListOptionsFunc ListOptionsFunc
ListOptionsFuncInvoked bool
OptionFunc OptionFunc
OptionFuncInvoked bool
OptionByNameFunc OptionByNameFunc
OptionByNameFuncInvoked bool
GetOsqueryConfigOptionsFunc GetOsqueryConfigOptionsFunc
GetOsqueryConfigOptionsFuncInvoked bool
ResetOptionsFunc ResetOptionsFunc
ResetOptionsFuncInvoked bool
}
func (s *OptionStore) SaveOptions(opts []kolide.Option, args ...kolide.OptionalArg) error {
s.SaveOptionsFuncInvoked = true
return s.SaveOptionsFunc(opts, args...)
}
func (s *OptionStore) ListOptions() ([]kolide.Option, error) {
s.ListOptionsFuncInvoked = true
return s.ListOptionsFunc()
}
func (s *OptionStore) Option(id uint) (*kolide.Option, error) {
s.OptionFuncInvoked = true
return s.OptionFunc(id)
}
func (s *OptionStore) OptionByName(name string, args ...kolide.OptionalArg) (*kolide.Option, error) {
s.OptionByNameFuncInvoked = true
return s.OptionByNameFunc(name, args...)
}
func (s *OptionStore) GetOsqueryConfigOptions() (map[string]interface{}, error) {
s.GetOsqueryConfigOptionsFuncInvoked = true
return s.GetOsqueryConfigOptionsFunc()
}
func (s *OptionStore) ResetOptions() ([]kolide.Option, error) {
s.ResetOptionsFuncInvoked = true
return s.ResetOptionsFunc()
}