config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Dec 27, 2023 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	GwMac             string  `yaml:"gw_mac"`
	AllAdvertisements bool    `yaml:"all_advertisements"`
	HciIndex          int     `yaml:"hci_index"`
	MQTT              *MQTT   `yaml:"mqtt,omitempty"`
	HTTP              *HTTP   `yaml:"http,omitempty"`
	Logging           Logging `yaml:"logging"`
	Debug             bool    `yaml:"debug"`
}

func ReadConfig

func ReadConfig(configFile string, strict bool) (Config, error)

type HTTP

type HTTP struct {
	Enabled  *bool         `yaml:"enabled,omitempty"`
	URL      string        `yaml:"url"`
	Interval time.Duration `yaml:"interval"`
	Username string        `yaml:"username"`
	Password string        `yaml:"password"`
}

type Logging

type Logging struct {
	Type       string `yaml:"type"`
	Level      string `yaml:"level"`
	Timestamps *bool  `yaml:"timestamps,omitempty"`
	WithCaller bool   `yaml:"with_caller,omitempty"`
}

type MQTT

type MQTT struct {
	Enabled           *bool   `yaml:"enabled,omitempty"`
	BrokerUrl         string  `yaml:"broker_url"`
	BrokerAddress     string  `yaml:"broker_address"`
	BrokerPort        int     `yaml:"broker_port"`
	ClientID          string  `yaml:"client_id"`
	Username          string  `yaml:"username"`
	Password          string  `yaml:"password"`
	TopicPrefix       string  `yaml:"topic_prefix"`
	LWTTopic          *string `yaml:"lwt_topic,omitempty"`
	LWTOnlinePayload  string  `yaml:"lwt_online_payload"`
	LWTOfflinePayload string  `yaml:"lwt_offline_payload"`
}

Jump to

Keyboard shortcuts

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