config

package
v0.0.10 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alert

type Alert struct {
	Name    string   `yaml:"name"`
	Type    string   `yaml:"type"`
	Command string   `yaml:"command"`
	Params  []string `yaml:"params"`
}

type Config

type Config struct {
	Hostname      string        `yaml:"hostname"`
	CheckInterval time.Duration `yaml:"check_interval"`
	Logger        Logger        `yaml:"logger"`
	Messenger     Messenger     `yaml:"messenger"`
	Storage       Storage       `yaml:"storage"`
	Alerts        []Alert       `yaml:"alerts"`
}

func NewConfig

func NewConfig(configFile string) (*Config, error)

type Logger added in v0.0.8

type Logger struct {
	Format string `yaml:"format"`
	Level  string `yaml:"level"`
}

type Messenger added in v0.0.9

type Messenger struct {
	Type   string `yaml:"type"`
	Token  string `yaml:"token"`
	ChatID int64  `yaml:"chatid"`
}

type Storage added in v0.0.9

type Storage struct {
	Type             string        `yaml:"type"`
	CooldownDuration time.Duration `yaml:"cooldown_duration"`
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL
JackTT - Gopher 🇻🇳