config

package
Version: v0.0.0-...-c4326c0 Latest Latest
Warning

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

Go to latest
Published: Dec 24, 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 {
	Server struct {
		Port     int
		Endpoint string
	}
	Checker struct {
		Interval int
		Timeout  int
	}
	URLMonitors []URLMonitorConfig
	Slack       SlackConfig
	Twilio      TwilioConfig
}

Config represents configuration set for the program to run

func CreateConfigurationFromFile

func CreateConfigurationFromFile(configFile string) (Config, error)

CreateConfigurationFromFile Returns a new configuration loaded from a file

type SlackConfig

type SlackConfig struct {
	Enabled    bool
	WebhookURL string
	Messages   SlackMessagesConfig
}

type SlackMessagesConfig

type SlackMessagesConfig struct {
	Healthy   string
	Unhealthy string
}

type TwilioConfig

type TwilioConfig struct {
	SMS TwilioSMSConfig
}

type TwilioSMSBodyConfig

type TwilioSMSBodyConfig struct {
	Healthy   string
	Unhealthy string
}

type TwilioSMSConfig

type TwilioSMSConfig struct {
	Enabled    bool
	AccountSID string
	AuthToken  string
	From       string
	To         []string
	Body       TwilioSMSBodyConfig
	Timeout    int
}

type URLMonitorConfig

type URLMonitorConfig struct {
	URL  string
	Name string
}

URLMonitorConfig represents each url monitor

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL