config

package
v0.0.0-...-cb2c967 Latest Latest
Warning

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

Go to latest
Published: May 15, 2023 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	ID          string `yaml:"id"`
	Name        string `yaml:"name"`
	Description string `yaml:"description"`

	Schedule ScheduleConfig `yaml:"schedule"`

	PagerDuty *PagerDuty `yaml:"pagerduty"`
}

type Config

type Config struct {
	Checks []Check `yaml:"checks"`

	PagerDuty *PagerDuty `yaml:"pagerduty"`
}

func Load

func Load(path string) (*Config, error)

type PagerDuty

type PagerDuty struct {
	ApiKey           string `yaml:"apiKey"`
	EscalationPolicy string `yaml:"escalationPolicy"`

	// From is an email address of a valid user associated with the account making the request
	From string `yaml:"from"`
}

type PartialDay

type PartialDay struct {
	Timezone string  `yaml:"timezone"`
	Times    []Times `yaml:"times"`
}

type ScheduleConfig

type ScheduleConfig struct {
	Every       *time.Duration `yaml:"duration"`
	Weekdays    *PartialDay    `yaml:"weekdays"`
	BankingDays *PartialDay    `yaml:"bankingDays"`
}

type Times

type Times struct {
	Start string `yaml:"start"`
	End   string `yaml:"end"`
}

func (Times) EndTime

func (t Times) EndTime() (time.Time, error)

func (Times) StartTime

func (t Times) StartTime() (time.Time, error)

Jump to

Keyboard shortcuts

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