config

package
v0.2.1 Latest Latest
Warning

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

Go to latest
Published: Jul 19, 2022 License: MIT Imports: 2 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 {
	Notification    Notification `yaml:"notification"`
	URL             []string     `yaml:"url"`
	PollingInterval int          `yaml:"pollingInterval"`
	LogFile         string       `yaml:"logFile"`
}

Config is the configuration for a monitor.

func New

func New(filepath string) (Config, error)

New returns a decoded Config from a YAML file at the given path.

type Notification

type Notification struct {
	Client   string `yaml:"client"`
	Token    string `yaml:"token"`
	AppToken string `yaml:"appToken"`
	Channel  string `yaml:"channel"`
	User     string `yaml:"user"`
}

Notification holds the configuration for a notification client.

Jump to

Keyboard shortcuts

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