internal

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Nov 3, 2020 License: MIT Imports: 29 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrConfigInvalidExtension = errors.New("invalid config extension")

Functions

This section is empty.

Types

type Accessories

type Accessories struct {
	Output  []Output  `json:"output" yaml:"output"`
	Digital []Digital `json:"digital" yaml:"digital"`
}

func (Accessories) List

func (a Accessories) List(api *ipx.Client) []*accessory.Accessory

type Config

type Config struct {
	Address     string      `json:"address" yaml:"address"`
	APIKey      interface{} `json:"api_key" yaml:"api_key"`
	Accessories Accessories `json:"accessories" yaml:"accessories"`
}

func NewConfig

func NewConfig() *Config

func (*Config) Load

func (c *Config) Load() error

func (Config) Write

func (c Config) Write() error

type Digital added in v0.2.0

type Digital struct {
	ID      int    `json:"id" yaml:"id"`
	Name    string `json:"name" yaml:"name"`
	Type    string `json:"type" yaml:"type"`
	Virtual bool   `json:"virtual" yaml:"virtual"`
}

func (Digital) Accessory added in v0.2.0

func (d Digital) Accessory(api *ipx.Client) *accessory.Accessory

func (Digital) IsValid added in v0.2.0

func (d Digital) IsValid() bool

type Gateway

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

func New

func New(debug bool) (*Gateway, error)

func (Gateway) Run

func (gw Gateway) Run()

type Output

type Output struct {
	ID      int    `json:"id" yaml:"id"`
	Name    string `json:"name" yaml:"name"`
	Virtual bool   `json:"virtual" yaml:"virtual"`
}

func (Output) Accessory

func (o Output) Accessory(api *ipx.Client) *accessory.Accessory

func (Output) IsValid

func (o Output) IsValid() bool

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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