Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Config ¶
func ConfigByID ¶
ConfigByID returns device by id from the database
func ConfigurationsByClass ¶
ConfigurationsByClass returns devices by class from the database
func (*Config) PartialUpdate ¶
PartialUpdate partially updates a config's details to the database
type ConfigDetails ¶
type ConfigDetails struct { ConfigID int `gorm:"index:idx_unique"` Key string `gorm:"index:idx_unique"` Value string }
TODO remove- migration only
type ConfigurableDevice ¶
type ConfigurableDevice[T any] interface { Device[T] ID() int // Assign(T) // Update1(map[string]any) error Update(map[string]any, T) error PartialUpdate(map[string]any, T) error Delete() error }
func NewConfigurableDevice ¶
func NewConfigurableDevice[T any](config *Config, instance T) ConfigurableDevice[T]
type Device ¶
func NewStaticDevice ¶
type Handler ¶
type Handler[T any] interface { Subscribe(fn func(Operation, Device[T])) Devices() []Device[T] Add(dev Device[T]) error Delete(name string) error ByName(name string) (Device[T], error) }
func Loadpoints ¶
Click to show internal directories.
Click to hide internal directories.