2017-01-10 21:49:14 +00:00
|
|
|
package mock
|
|
|
|
|
|
2021-09-14 12:11:07 +00:00
|
|
|
import (
|
|
|
|
|
"context"
|
|
|
|
|
|
|
|
|
|
"github.com/fleetdm/fleet/v4/server/fleet"
|
|
|
|
|
)
|
2017-01-10 21:49:14 +00:00
|
|
|
|
2021-08-24 21:49:56 +00:00
|
|
|
//go:generate mockimpl -o datastore_mock.go "s *DataStore" "fleet.Datastore"
|
2022-07-18 16:44:30 +00:00
|
|
|
//go:generate mockimpl -o datastore_installers.go "s *InstallerStore" "fleet.InstallerStore"
|
2017-01-10 21:49:14 +00:00
|
|
|
|
2021-06-06 22:07:29 +00:00
|
|
|
var _ fleet.Datastore = (*Store)(nil)
|
2017-01-10 21:49:14 +00:00
|
|
|
|
|
|
|
|
type Store struct {
|
2021-08-24 21:49:56 +00:00
|
|
|
DataStore
|
2017-01-10 21:49:14 +00:00
|
|
|
}
|
|
|
|
|
|
2022-09-23 19:00:23 +00:00
|
|
|
func (m *Store) EnrollOrbit(ctx context.Context, hardwareUUID string, orbitNodeKey string, teamID *uint) (*fleet.Host, error) {
|
|
|
|
|
return nil, nil
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
func (m *Store) LoadHostByOrbitNodeKey(ctx context.Context, orbitNodeKey string) (*fleet.Host, error) {
|
|
|
|
|
return nil, nil
|
|
|
|
|
}
|
|
|
|
|
|
2021-11-22 17:06:12 +00:00
|
|
|
func (m *Store) Drop() error { return nil }
|
|
|
|
|
func (m *Store) MigrateTables(ctx context.Context) error { return nil }
|
|
|
|
|
func (m *Store) MigrateData(ctx context.Context) error { return nil }
|
|
|
|
|
func (m *Store) MigrationStatus(ctx context.Context) (*fleet.MigrationStatus, error) {
|
|
|
|
|
return &fleet.MigrationStatus{}, nil
|
|
|
|
|
}
|
|
|
|
|
func (m *Store) Name() string { return "mock" }
|