data

package
v1.2.5 Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2022 License: Apache-2.0 Imports: 0 Imported by: 8

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      uint64      `json:"aid"`
	CharacteristicID uint64      `json:"iid"`
	Value            interface{} `json:"value"`

	// Status contains the status code. Should be interpreted as integer.
	// The property is omitted 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 omitted 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