bridgetest

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: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// Username is the application key for the bridge.
	Username = "username"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Bridge

type Bridge struct {

	// URL represents the URL of the server.
	URL string
	// contains filtered or unexported fields
}

Bridge represents a "fake" Hue bridge that simulates the functions of an actual bridge as closely as possible.

func New

func New() (*Bridge, error)

New creates a new bridge.

func (*Bridge) AddResource

func (b *Bridge) AddResource(r *bridge.Resource)

AddResource adds the provided resource to the bridge.

func (*Bridge) Close

func (b *Bridge) Close()

Close shuts down the bridge.

func (*Bridge) GetResource

func (b *Bridge) GetResource(id string) (*bridge.Resource, error)

GetResource attempts to retrieve the specified resource by its ID.

func (*Bridge) PushButton

func (b *Bridge) PushButton()

PushButton simulates a user pressing the button on the bridge.

Jump to

Keyboard shortcuts

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