device

package
v0.0.7-alpha.1 Latest Latest
Warning

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

Go to latest
Published: Dec 3, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DatastorePartition = "devices"

	Configuration *Config

	DefaultConfig = Config{
		Datastore: &datastore.Config{
			Backend:          "AFERO_FS",
			ConsistencyLevel: "local",
			RootDir:          "trusted-data/datastore",
			ReadBufferSize:   50,
			Serializer:       "json",
		},
	}
)
View Source
var (
	ErrInvalidDeviceID = fmt.Errorf("invalid device ID")
)

Functions

This section is empty.

Types

type Config

type Config struct {
	Datastore *datastore.Config `yaml:"datastore" json:"datastore" mapstructure:"datastore"`
}

type Datastore

type Datastore struct {
	// contains filtered or unexported fields
}

func NewDatastore

func NewDatastore(
	params *datastore.Params[*entities.Device],
	storeType datastore.StoreType) *Datastore

func (*Datastore) DeviceDAO

func (ds *Datastore) DeviceDAO() (dao.DeviceDAO, error)

type Service

type Service struct {
	// contains filtered or unexported fields
}

func NewService

func NewService(config *Config) (*Service, error)

func (*Service) Save

func (s *Service) Save(device *entities.Device) error

Directories

Path Synopsis
dao

Jump to

Keyboard shortcuts

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