bridge

package
v0.0.0-...-bea21ec Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	TypeBridgeHome   = "bridge_home"
	TypeGroupedLight = "grouped_light"
	TypeLight        = "light"
	TypeZone         = "zone"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Color

type Color struct {
	XY *ColorXY `json:"xy,omitempty"`
}

type ColorXY

type ColorXY struct {
	X float64 `json:"x"`
	Y float64 `json:"y"`
}

type Dimming

type Dimming struct {
	Brightness float64 `json:"brightness"`
}

type Dynamics

type Dynamics struct {
	Duration int64 `json:"duration"`
}

type Error

type Error struct {
	Description string `json:"description"`
}

type EventStream

type EventStream struct {
	Data []*Resource `json:"data"`
}

type Metadata

type Metadata struct {
	Name string `json:"name"`
}

type On

type On struct {
	On bool `json:"on"`
}

type Owner

type Owner struct {
	RID   string `json:"rid"`
	RType string `json:"rtype"`
}

type RegistrationRequest

type RegistrationRequest struct {
	DeviceType        string `json:"devicetype"`
	GenerateClientKey bool   `json:"generateclientkey"`
}

type RegistrationResponse

type RegistrationResponse struct {
	Error   *RegistrationResponseError   `json:"error"`
	Success *RegistrationResponseSuccess `json:"success"`
}

type RegistrationResponseError

type RegistrationResponseError struct {
	Description string `json:"description"`
}

type RegistrationResponseSuccess

type RegistrationResponseSuccess struct {
	Username string `json:"username"`
}

type Resource

type Resource struct {
	ID       string    `json:"id,omitempty"`
	Owner    *Owner    `json:"owner,omitempty"`
	Metadata *Metadata `json:"metadata,omitempty"`
	On       *On       `json:"on,omitempty"`
	Dimming  *Dimming  `json:"dimming,omitempty"`
	Color    *Color    `json:"color,omitempty"`
	Dynamics *Dynamics `json:"dynamics,omitempty"`
	Type     string    `json:"type,omitempty"`
}

func (*Resource) CopyFrom

func (r *Resource) CopyFrom(v *Resource)

CopyFrom populates the resource with only the values set in the provided parameter.

type Response

type Response struct {
	Errors []*Error        `json:"errors"`
	Data   json.RawMessage `json:"data"`
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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