fleet/server/mock/datastore_osquery_options.go

44 lines
1.1 KiB
Go

// Automatically generated by mockimpl. DO NOT EDIT!
package mock
import (
"encoding/json"
"github.com/fleetdm/fleet/server/kolide"
)
var _ kolide.OsqueryOptionsStore = (*OsqueryOptionsStore)(nil)
type ApplyOptionsFunc func(options *kolide.OptionsSpec) error
type GetOptionsFunc func() (*kolide.OptionsSpec, error)
type OptionsForPlatformFunc func(platform string) (json.RawMessage, error)
type OsqueryOptionsStore struct {
ApplyOptionsFunc ApplyOptionsFunc
ApplyOptionsFuncInvoked bool
GetOptionsFunc GetOptionsFunc
GetOptionsFuncInvoked bool
OptionsForPlatformFunc OptionsForPlatformFunc
OptionsForPlatformFuncInvoked bool
}
func (s *OsqueryOptionsStore) ApplyOptions(options *kolide.OptionsSpec) error {
s.ApplyOptionsFuncInvoked = true
return s.ApplyOptionsFunc(options)
}
func (s *OsqueryOptionsStore) GetOptions() (*kolide.OptionsSpec, error) {
s.GetOptionsFuncInvoked = true
return s.GetOptionsFunc()
}
func (s *OsqueryOptionsStore) OptionsForPlatform(platform string) (json.RawMessage, error) {
s.OptionsForPlatformFuncInvoked = true
return s.OptionsForPlatformFunc(platform)
}