door

package
v0.0.0-...-2c276d8 Latest Latest
Warning

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

Go to latest
Published: Oct 3, 2023 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Overview

SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>

SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>

SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>

SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>

SPDX-License-Identifier: Apache-2.0 Copyright © 2022 Roberto Hidalgo <nidito@un.rob.mx>

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Connect

func Connect(config map[string]any) (err error)

func RequestToEnter

func RequestToEnter(username string) error

RequestToEnter opens the door unless it's already open or opening

Types

type Door

type Door interface {
	IsOpen() (bool, error)
	Open(errors chan<- error, done chan<- bool)
}
var (
	Active Door
)

func NewHue

func NewHue(config map[string]any) (Door, error)

func NewMock

func NewMock(config map[string]any) (Door, error)

func NewWemo

func NewWemo(config map[string]any) (Door, error)

type Error

type Error interface {
	Error() string
	Code() int
	Name() string
}

type ErrorAlreadyOpen

type ErrorAlreadyOpen struct{}

func (*ErrorAlreadyOpen) Code

func (err *ErrorAlreadyOpen) Code() int

func (*ErrorAlreadyOpen) Error

func (err *ErrorAlreadyOpen) Error() string

func (*ErrorAlreadyOpen) Name

func (err *ErrorAlreadyOpen) Name() string

type ErrorCommunication

type ErrorCommunication struct {
	// contains filtered or unexported fields
}

func (*ErrorCommunication) Code

func (err *ErrorCommunication) Code() int

func (*ErrorCommunication) Error

func (err *ErrorCommunication) Error() string

func (*ErrorCommunication) Name

func (err *ErrorCommunication) Name() string

type Hue

type Hue struct {
	// contains filtered or unexported fields
}

func (*Hue) Close

func (h *Hue) Close(errors chan error)

func (*Hue) IsOpen

func (h *Hue) IsOpen() (bool, error)

func (*Hue) Open

func (h *Hue) Open(errors chan<- error, done chan<- bool)

func (*Hue) Setup

func (h *Hue) Setup(domain string) error

type HueConfig

type HueConfig struct {
	// contains filtered or unexported fields
}

type Wemo

type Wemo struct {
	// contains filtered or unexported fields
}

func (*Wemo) Close

func (wm *Wemo) Close(errors chan error)

func (*Wemo) IsOpen

func (wm *Wemo) IsOpen() (bool, error)

func (*Wemo) Open

func (wm *Wemo) Open(errors chan<- error, done chan<- bool)

Jump to

Keyboard shortcuts

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