configuration

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

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

Go to latest
Published: Dec 14, 2018 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 {
	// Debug
	Debug      bool
	Copyrights bool

	// Config
	ConfigFile string

	// Collector Settings
	Concurrency       int
	Interval          time.Duration
	Timeout           time.Duration
	AllowInsecureSSH  bool
	DisableCollection bool

	// Git
	GitPush bool

	// User Settings
	Workspace   string
	DefaultUser string
	DefaultPass string

	// Mail
	EmailEnabled bool
	EmailTo      string
	EmailFrom    string
	EmailSubject string

	// SMTP Plain Auth
	SMTPHost string
	SMTPPort int
	SMTPUser string
	SMTPPass string

	// Webserver
	WebserverEnabled bool
	HTTPListen       string

	// Devices
	Devices []DeviceConfig
}

Config holds the general application settings.

func GetConfig

func GetConfig() *Config

GetConfig is concurrency safe loading and retrieving of the config data.

type DeviceConfig

type DeviceConfig struct {
	Name           string
	Host           string
	Type           string
	User           string
	Pass           string
	Port           int
	Disabled       bool
	CustomTimeout  time.Duration
	CommandTimeout time.Duration
}

DeviceConfig holds the device specific settings.

func (DeviceConfig) GetName

func (d DeviceConfig) GetName() string

GetName provides a simple implementation for the Collector interface.

Jump to

Keyboard shortcuts

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