signal

package
v0.0.0-...-7f9f1c8 Latest Latest
Warning

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

Go to latest
Published: Jan 25, 2023 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	HueKindLight = HueKind(0)
	HueKindGroup = HueKind(1)
)
View Source
const (
	StateOff = State(0)
	StateOn  = State(1)
)
View Source
const (
	TypeHue = Type(0)

	TypeDefault = TypeHue
)

Variables

View Source
var (
	AllHueKinds = HueKinds{
		HueKindLight,
		HueKindGroup,
	}
)
View Source
var (
	AllStates = States{
		StateOff,
		StateOn,
	}
)
View Source
var (
	AllTypes = Types{
		TypeHue,
	}
)

Functions

This section is empty.

Types

type Facade

type Facade struct {
	Signal
	// contains filtered or unexported fields
}

func (*Facade) Dispose

func (this *Facade) Dispose() error

func (*Facade) GetType

func (this *Facade) GetType() Type

func (*Facade) Initialize

func (this *Facade) Initialize() error

func (*Facade) SetupConfiguration

func (this *Facade) SetupConfiguration(using common.FlagHolder)

type Hue

type Hue struct {
	Pair   bool
	Bridge string
	User   string

	Kinds HueKinds
	Name  *regexp.Regexp

	Britness   uint8
	Hue        uint16
	Saturation uint8
	// contains filtered or unexported fields
}

func (*Hue) Dispose

func (this *Hue) Dispose() error

func (*Hue) Ensure

func (this *Hue) Ensure(state State) error

func (*Hue) GetType

func (this *Hue) GetType() Type

func (*Hue) Initialize

func (this *Hue) Initialize() error

func (*Hue) SetupConfiguration

func (this *Hue) SetupConfiguration(using common.FlagHolder)

func (*Hue) Update

func (this *Hue) Update() error

type HueCredentials

type HueCredentials struct {
	Host string `json:"host"`
	User string `json:"user"`
}

func (HueCredentials) Bridge

func (this HueCredentials) Bridge() *huego.Bridge

func (HueCredentials) HasContent

func (this HueCredentials) HasContent() bool

func (HueCredentials) IsZero

func (this HueCredentials) IsZero() bool

func (HueCredentials) MarshalBinary

func (this HueCredentials) MarshalBinary() (data []byte, err error)

func (*HueCredentials) UnmarshalBinary

func (this *HueCredentials) UnmarshalBinary(data []byte) error

type HueKind

type HueKind uint8

func (*HueKind) Set

func (this *HueKind) Set(plain string) error

func (HueKind) String

func (this HueKind) String() string

type HueKinds

type HueKinds []HueKind

func (HueKinds) Has

func (this HueKinds) Has(v HueKind) bool

func (HueKinds) IsCumulative

func (this HueKinds) IsCumulative() bool

func (*HueKinds) Set

func (this *HueKinds) Set(plain string) error

func (HueKinds) String

func (this HueKinds) String() string

func (HueKinds) Strings

func (this HueKinds) Strings() []string

type Signal

type Signal interface {
	SetupConfiguration(common.FlagHolder)
	Initialize() error
	Dispose() error
	Ensure(State) error
	Update() error

	GetType() Type
}

type State

type State uint8

func (*State) Set

func (this *State) Set(plain string) error

func (State) String

func (this State) String() string

type States

type States []State

func (States) String

func (this States) String() string

func (States) Strings

func (this States) Strings() []string

type Type

type Type uint8

func (*Type) Set

func (this *Type) Set(plain string) error

func (Type) String

func (this Type) String() string

type Types

type Types []Type

func (Types) String

func (this Types) String() string

func (Types) Strings

func (this Types) Strings() []string

Jump to

Keyboard shortcuts

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