mqtt

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2020 License: MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	InvalidDeviceID    = ferror(fmt.Errorf("%w: Missing device ID", uhppoted.BadRequest), "Missing device ID")
	InvalidCardNumber  = ferror(fmt.Errorf("%w: Missing/invalid card number", uhppoted.BadRequest), "Missing/invalid card number")
	InvalidDoorID      = ferror(fmt.Errorf("%w: Missing/invalid door ID", uhppoted.BadRequest), "Missing/invalid door ID")
	InvalidDoorDelay   = ferror(fmt.Errorf("%w: Missing/invalid door delay", uhppoted.BadRequest), "Missing/invalid door delay")
	InvalidDoorControl = ferror(fmt.Errorf("%w: Missing/invalid door control", uhppoted.BadRequest), "Missing/invalid door control")
	InvalidEventID     = ferror(fmt.Errorf("%w: Missing/invalid event ID", uhppoted.BadRequest), "Missing/invalid event ID")
	InvalidDateTime    = ferror(fmt.Errorf("%w: Missing/invalid date/time", uhppoted.BadRequest), "Missing/invalid date/time")
)

Functions

This section is empty.

Types

type Alerts

type Alerts struct {
	QOS      byte
	Retained bool
}

type Connection

type Connection struct {
	Broker   string
	ClientID string
	UserName string
	Password string
}

type Encryption

type Encryption struct {
	SignOutgoing    bool
	EncryptOutgoing bool
	EventsKeyID     string
	SystemKeyID     string
	HOTP            *auth.HOTP
	RSA             *auth.RSA
	Nonce           auth.Nonce
}

type MQTTD

type MQTTD struct {
	ServerID       string
	Connection     Connection
	TLS            *tls.Config
	Topics         Topics
	Alerts         Alerts
	HMAC           auth.HMAC
	Encryption     Encryption
	Authentication string
	Permissions    auth.Permissions
	EventMap       string
	Debug          bool
	// contains filtered or unexported fields
}

func (*MQTTD) Close

func (m *MQTTD) Close(log *log.Logger)

func (*MQTTD) Run

func (mqttd *MQTTD) Run(u *uhppote.UHPPOTE, log *log.Logger) error

type SystemMonitor

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

func NewSystemMonitor

func NewSystemMonitor(mqttd *MQTTD, log *log.Logger) *SystemMonitor

func (*SystemMonitor) Alert

func (m *SystemMonitor) Alert(monitor monitoring.Monitor, msg string) error

func (*SystemMonitor) Alive

func (m *SystemMonitor) Alive(monitor monitoring.Monitor, msg string) error

type Topics

type Topics struct {
	Requests string
	Replies  string
	Events   string
	System   string
}

Jump to

Keyboard shortcuts

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