store

package
v0.0.0-...-24c5a16 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Sep 13, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DataStore

type DataStore interface {
	Ping(ctx context.Context) error
	Close(ctx context.Context) error
	DropDatabase(ctx context.Context) error
	Migrate(ctx context.Context, version string, automigrate bool) error
	MigrateLatest(ctx context.Context) error
	GetMapping(ctx context.Context, tenantID string) (*model.Mapping, error)
	UpdateAndGetMapping(ctx context.Context, tenantID string, inventory []string) (
		*model.Mapping, error)
}

DataStore interface for DataStore services

type Store

type Store interface {
	BulkIndexDeployments(ctx context.Context, deployments []*model.Deployment) error
	BulkIndexDevices(ctx context.Context, devices, removedDevices []*model.Device) error
	GetDevicesIndex(tid string) string
	GetDevicesRoutingKey(tid string) string
	GetDevicesIndexMapping(ctx context.Context, tid string) (map[string]interface{}, error)
	GetDeploymentsIndex(tid string) string
	GetDeploymentsRoutingKey(tid string) string
	GetDeploymentsIndexMapping(ctx context.Context, tid string) (map[string]interface{}, error)
	Migrate(ctx context.Context) error
	AggregateDevices(ctx context.Context, query model.Query) (model.M, error)
	AggregateDeployments(ctx context.Context, query model.Query) (model.M, error)
	SearchDevices(ctx context.Context, query model.Query) (model.M, error)
	SearchDeployments(ctx context.Context, query model.Query) (model.M, error)
	Ping(ctx context.Context) error
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL