deviceconfig

package
v0.0.0-...-3444db6 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2020 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Device

type Device struct {
	UUID       string
	RequestID  string
	RequestKey string
	Name       string
	State      int
	Comment    string
	App        string
	Config     string
}

func (*Device) Marshal

func (d *Device) Marshal(v interface{}) error

func (Device) Unmarshal

func (d Device) Unmarshal(v interface{}) error

type DeviceConfig

type DeviceConfig struct {
	Mut  sync.RWMutex
	File DeviceConfigFile
}

func (*DeviceConfig) Add

func (c *DeviceConfig) Add(d Device)

func (*DeviceConfig) Delete

func (c *DeviceConfig) Delete(uid string)

func (*DeviceConfig) Edit

func (c *DeviceConfig) Edit(uid string, d Device) error

func (*DeviceConfig) Get

func (c *DeviceConfig) Get(uid string) (Device, error)

func (*DeviceConfig) GetWithReqID

func (c *DeviceConfig) GetWithReqID(rid string) (Device, error)

func (*DeviceConfig) List

func (c *DeviceConfig) List() []Device

func (*DeviceConfig) LoadConfig

func (c *DeviceConfig) LoadConfig() error

func (*DeviceConfig) SaveConfig

func (c *DeviceConfig) SaveConfig() error

type DeviceConfigFile

type DeviceConfigFile struct {
	Header  config.FileHeader
	Devices []Device
}

Jump to

Keyboard shortcuts

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