core

package
v0.0.0-...-6d248b5 Latest Latest
Warning

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

Go to latest
Published: Jan 16, 2021 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Storage

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

Storage All devices map

func NewStorage

func NewStorage(log *utils.Log) *Storage

NewStorage Make new storage

func (*Storage) AddDevice

func (s *Storage) AddDevice(name string, desc string, devType string)

AddDevice Add new device in storage

func (*Storage) Device

func (s *Storage) Device(name string) devices.IDevice

Device Get device by name

func (*Storage) DeviceByDescription

func (s *Storage) DeviceByDescription(desc string) (devices.IDevice, error)

DeviceByDescription Get device by description

func (*Storage) DeviceByID

func (s *Storage) DeviceByID(id int) (devices.IDevice, error)

func (*Storage) Devices

func (s *Storage) Devices() []devices.IDevice

Devices Get all devices

func (*Storage) DevicesByType

func (s *Storage) DevicesByType(devType string) []devices.IDevice

DevicesByType Get all devices by type

func (*Storage) RemoveByID

func (s *Storage) RemoveByID(id int) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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