mqttActions

package
v0.2.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version = "unreleased"
	Quiet   = false
	Verbose = false
	Config  ConfigType
)

Functions

func RunServer

func RunServer()

Types

type ActionType

type ActionType struct {
	Name    string `yaml:"name"`
	Watch   string `yaml:"watch"`
	Path    string `yaml:"path"`
	Trigger string `yaml:"trigger"`
	Action  []struct {
		Topic   string `yaml:"topic"`
		Message string `yaml:"message"`
	} `yaml:"action"`
	Enabled *bool `yaml:"enabled,omitempty"`
}

type ConfigType

type ConfigType struct {
	HealthCheckListener *string      `yaml:"health_check,omitempty"`
	Verbose             *bool        `yaml:"verbose,omitempty"`
	MQTT                *MQTTConfig  `yaml:"mqtt"`
	Actions             []ActionType `yaml:"actions"`
}

type MQTTConfig

type MQTTConfig struct {
	Broker   string `yaml:"broker"`
	Port     string `yaml:"port"`
	Protocol string `yaml:"protocol"`
	User     string `yaml:"user"`
	Password string `yaml:"password"`
	ClientID string `yaml:"client_id"`
	QoS      byte   `yaml:"qos"`
	Retain   bool   `yaml:"retain"`
}

Jump to

Keyboard shortcuts

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