data

package
v1.1.1-0...-6dff958 Latest Latest
Warning

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

Go to latest
Published: May 31, 2019 License: Apache-2.0 Imports: 0 Imported by: 0

Documentation

Overview

Package data provides structs to map json to objects.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Characteristic

type Characteristic struct {
	AccessoryID      int64       `json:"aid"`
	CharacteristicID int64       `json:"iid"`
	Value            interface{} `json:"value"`

	// Status contains the status code. Should be interpreted as integer.
	// The property is omited if not specified, which makes the payload smaller.
	Status interface{} `json:"status,omitempty"`

	// Events contains the events settings for a characteristic. Should be interpreted as boolean.
	// The property is omited if not specified, which makes the payload smaller.
	Events interface{} `json:"ev,omitempty"`
}

Characteristic implements json of format.

{
    "aid": 0, "iid": 1, "value": 10 [, "status": 0, "ev": true ]
}

type Characteristics

type Characteristics struct {
	Characteristics []Characteristic `json:"characteristics"`
}

Characteristics implements json of format

{
    "characteristics": [
        ...
    ]
}

Jump to

Keyboard shortcuts

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