2017-01-10 21:49:14 +00:00
|
|
|
package mock
|
|
|
|
|
|
|
|
//go:generate mockimpl -o datastore_users.go "s *UserStore" "kolide.UserStore"
|
|
|
|
//go:generate mockimpl -o datastore_invites.go "s *InviteStore" "kolide.InviteStore"
|
|
|
|
//go:generate mockimpl -o datastore_appconfig.go "s *AppConfigStore" "kolide.AppConfigStore"
|
2017-02-02 20:30:59 +00:00
|
|
|
//go:generate mockimpl -o datastore_licenses.go "s *LicenseStore" "kolide.LicenseStore"
|
2017-02-12 04:27:43 +00:00
|
|
|
//go:generate mockimpl -o datastore_labels.go "s *LabelStore" "kolide.LabelStore"
|
2017-04-06 18:55:24 +00:00
|
|
|
//go:generate mockimpl -o datastore_decorators.go "s *DecoratorStore" "kolide.DecoratorStore"
|
|
|
|
//go:generate mockimpl -o datastore_options.go "s *OptionStore" "kolide.OptionStore"
|
|
|
|
//go:generate mockimpl -o datastore_packs.go "s *PackStore" "kolide.PackStore"
|
|
|
|
//go:generate mockimpl -o datastore_hosts.go "s *HostStore" "kolide.HostStore"
|
2017-01-10 21:49:14 +00:00
|
|
|
|
2017-02-01 17:20:50 +00:00
|
|
|
import "github.com/kolide/kolide/server/kolide"
|
2017-01-10 21:49:14 +00:00
|
|
|
|
|
|
|
var _ kolide.Datastore = (*Store)(nil)
|
|
|
|
|
|
|
|
type Store struct {
|
|
|
|
kolide.CampaignStore
|
|
|
|
kolide.SessionStore
|
|
|
|
kolide.PasswordResetStore
|
|
|
|
kolide.QueryStore
|
|
|
|
kolide.ScheduledQueryStore
|
2017-01-13 18:35:25 +00:00
|
|
|
kolide.FileIntegrityMonitoringStore
|
|
|
|
kolide.YARAStore
|
2017-03-30 15:31:28 +00:00
|
|
|
kolide.TargetStore
|
2017-01-10 21:49:14 +00:00
|
|
|
AppConfigStore
|
2017-03-28 21:45:18 +00:00
|
|
|
DecoratorStore
|
2017-04-06 18:55:24 +00:00
|
|
|
HostStore
|
|
|
|
InviteStore
|
|
|
|
LabelStore
|
|
|
|
LicenseStore
|
|
|
|
OptionStore
|
|
|
|
PackStore
|
|
|
|
UserStore
|
2017-01-10 21:49:14 +00:00
|
|
|
}
|
|
|
|
|
|
|
|
func (m *Store) Drop() error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *Store) MigrateTables() error {
|
|
|
|
return nil
|
|
|
|
}
|
|
|
|
func (m *Store) MigrateData() error {
|
|
|
|
return nil
|
|
|
|
}
|
2017-03-09 18:40:52 +00:00
|
|
|
func (m *Store) MigrationStatus() (kolide.MigrationStatus, error) {
|
|
|
|
return 0, nil
|
2017-03-08 17:17:07 +00:00
|
|
|
}
|
2017-01-10 21:49:14 +00:00
|
|
|
func (m *Store) Name() string {
|
|
|
|
return "mock"
|
|
|
|
}
|
2017-05-30 19:42:00 +00:00
|
|
|
|
|
|
|
type mockTransaction struct{}
|
|
|
|
|
|
|
|
func (m *mockTransaction) Commit() error { return nil }
|
|
|
|
func (m *mockTransaction) Rollback() error { return nil }
|
|
|
|
|
|
|
|
func (m *Store) Begin() (kolide.Transaction, error) {
|
|
|
|
return &mockTransaction{}, nil
|
|
|
|
}
|