loader

package
v0.0.0-...-aecb995 Latest Latest
Warning

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

Go to latest
Published: Mar 15, 2021 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MQTT    *MQTTConfig    `yaml:"mqtt"`
	Devices []DeviceConfig `yaml:"devices"`
}

type Device

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

func Load

func Load(configFile string) ([]*Device, error)

func NewDevice

func NewDevice(mqtt *base.MQTT, deviceConfig DeviceConfig) (*Device, error)

func (*Device) Run

func (device *Device) Run()

type DeviceConfig

type DeviceConfig struct {
	Name       string `yaml:"name"`
	Model      string `yaml:"model"`
	Host       string `yaml:"host"`
	Port       string `yaml:"port"`
	MQTTPrefix string `yaml:"mqtt_prefix"`
	DUID       string `yaml:"duid"`
	AuthToken  string `yaml:"auth_token"`
}

type MQTTConfig

type MQTTConfig struct {
	Host     string `yaml:"host"`
	Port     string `yaml:"port"`
	Protocol string `yaml:"protocol"`
	Username string `yaml:"username"`
	Password string `yaml:"password"`
}

Jump to

Keyboard shortcuts

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