config

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

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

Go to latest
Published: Jul 31, 2023 License: GPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AlarmManager

type AlarmManager struct {
	Host     string
	Port     int
	DeviceId string
}

type Config

type Config struct {
	Mqtt           Mqtt
	Rabbitmq       Rabbitmq
	AlarmManager   AlarmManager
	Sensors        map[string]*Sensor
	SensorTriggers map[string]SensorTrigger
	RedisServer    RedisServer
}

func ReadConfig

func ReadConfig() (Config, error)

type Mqtt

type Mqtt struct {
	Host          string
	Port          int
	User          string
	Password      string
	WildcardTopic string
}

type Rabbitmq

type Rabbitmq struct {
	Host     string
	Port     int
	User     string
	Password string
	Queue    string
}

type RedisServer

type RedisServer struct {
	IP       string
	Port     int
	Password string
	Database int
}

type Sensor

type Sensor struct {
	Name           string
	SensorTriggers map[string]bool
}

type SensorTrigger

type SensorTrigger struct {
	Name    string
	Sensors map[string]*Sensor
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳