doors

package
v0.0.5 Latest Latest
Warning

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

Go to latest
Published: Mar 25, 2024 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var OfflineAfter time.Duration
View Source
var OnAccess func(door string, fob string, time time.Time, granted bool)

Functions

func Connect

func Connect(conn MqttOptions) error

func DeleteAllUsers

func DeleteAllUsers()

func Disconnect

func Disconnect()

func InstallApi

func InstallApi()

func SetFobEnabled

func SetFobEnabled(fob string, amemberUserId int, enabled bool)

Types

type Door

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

func All

func All() []*Door

func (*Door) DeleteUserRecords

func (d *Door) DeleteUserRecords() error

func (*Door) IsOnline

func (d *Door) IsOnline() bool

func (*Door) Open

func (d *Door) Open() error

func (*Door) SetFobEnabled

func (d *Door) SetFobEnabled(fob string, userName string, enabled bool) error

type MqttOptions

type MqttOptions struct {
	Uri      string
	Username string
	Password string
	Topic    string
}

Jump to

Keyboard shortcuts

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