config

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type App

type App struct {
	Port         string
	Debug        bool
	Hostname     string
	LogLevel     string
	Version      string
	AuthToken    string
	LogPath      string
	WriteTimeout time.Duration
	Plugin       interface{}
}

func Parse

func Parse() (*App, error)

type DB

type DB struct {
	Addr     string
	Port     int
	User     string
	Password string
	DBName   string
	Driver   string

	Timeout      time.Duration
	ReadTimeout  time.Duration
	WriteTimeout time.Duration

	MaxOpenConnections    int
	MaxIdleConnections    int
	ConnectionMaxLifetime time.Duration

	Retry Retry
}

func ParseDB

func ParseDB() *DB

type Grafana

type Grafana struct {
	URL             string
	Token           string
	IncidentDetails bool
	OnCall          *OnCall

	Schedules map[string]*ScheduleEntry
}

func ParseGrafana

func ParseGrafana() *Grafana

type NotificationTemplate

type NotificationTemplate struct {
	Start string
	Title string
	End   string
}

type OnCall

type OnCall struct {
	URL   string
	Token string
}

type Retry

type Retry struct {
	RetryMax     int
	RetryTimeout time.Duration
}

type ScheduleEntry

type ScheduleEntry struct {
	Name        string
	Transport   string
	CallbackURL string
	IcalURL     string
	Details     bool
}

Jump to

Keyboard shortcuts

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