brokerManager

package
v0.0.0-...-9d1653e Latest Latest
Warning

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

Go to latest
Published: May 11, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func WriteBrokerData

func WriteBrokerData(brokerData BrokerData, password string)

Types

type Broker

type Broker struct {
	Uuid       string `json:"uuid"`
	Name       string `json:"name"`
	ClientName string `json:"clientName"`
	Uri        string `json:"uri"`
	Port       int    `json:"port"`
	Username   string `json:"username"`
	Password   string `json:"password"`
}

Stores the credentials required to connect to a MQTT broker

type BrokerData

type BrokerData struct {
	Brokers []Broker `json:"brokers"`
	Hash    []byte   `json:"hash"`
}

Storages the list of mqtt broker credentials

func AddBroker

func AddBroker(brokerData BrokerData, broker Broker, password string) BrokerData

func ReadBrokerData

func ReadBrokerData(password string) (BrokerData, error)

func RemoveBroker

func RemoveBroker(brokerData BrokerData, broker Broker, password string) BrokerData

Jump to

Keyboard shortcuts

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