storageManager

package
v0.0.0-...-00c2f43 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DeviceStorageManager

type DeviceStorageManager struct {
	StorageInterface[registry.Device]
	// contains filtered or unexported fields
}

func NewDeviceStorageManager

func NewDeviceStorageManager() *DeviceStorageManager

func (*DeviceStorageManager) Add

func (manager *DeviceStorageManager) Add(device *registry.Device) error

func (*DeviceStorageManager) Delete

func (manager *DeviceStorageManager) Delete(id string) error

func (*DeviceStorageManager) Get

func (manager *DeviceStorageManager) Get(id string) (*registry.Device, error)

func (*DeviceStorageManager) List

func (manager *DeviceStorageManager) List() ([]*uuid.UUID, error)

func (*DeviceStorageManager) Update

func (manager *DeviceStorageManager) Update(device *registry.Device) error

func (*DeviceStorageManager) UpdateContents

func (manager *DeviceStorageManager) UpdateContents(id string, contents []string) error

type LocationStorageManager

type LocationStorageManager struct {
	StorageInterface[registry.Location]
	// contains filtered or unexported fields
}

func NewLocationStorageManager

func NewLocationStorageManager() *LocationStorageManager

func (*LocationStorageManager) Add

func (manager *LocationStorageManager) Add(location *registry.Location) error

func (*LocationStorageManager) Delete

func (manager *LocationStorageManager) Delete(id string) error

func (*LocationStorageManager) Get

func (manager *LocationStorageManager) Get(id string) (*registry.Location, error)

func (*LocationStorageManager) List

func (manager *LocationStorageManager) List() ([]*registry.Location, error)

func (*LocationStorageManager) Update

func (manager *LocationStorageManager) Update(location *registry.Location) error

type ManufacturerStorageManager

type ManufacturerStorageManager struct {
	StorageInterface[registry.Manufacturer]
	// contains filtered or unexported fields
}

func NewManufacturerStorageManager

func NewManufacturerStorageManager() *ManufacturerStorageManager

func (*ManufacturerStorageManager) Add

func (manager *ManufacturerStorageManager) Add(manufacturer *registry.Manufacturer) error

func (*ManufacturerStorageManager) Delete

func (manager *ManufacturerStorageManager) Delete(id string) error

func (*ManufacturerStorageManager) Get

func (*ManufacturerStorageManager) List

func (manager *ManufacturerStorageManager) List() ([]*registry.Manufacturer, error)

func (*ManufacturerStorageManager) Update

func (manager *ManufacturerStorageManager) Update(manufacturer *registry.Manufacturer) error

type StorageInterface

type StorageInterface[T any] interface {
	Add(device *T) error
	Get(id string) (*T, error)
	List() ([]*uuid.UUID, error)
	Update(newEntry *T) error
	Delete(id string) error
}

Jump to

Keyboard shortcuts

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