config

package
v0.0.0-...-78a2729 Latest Latest
Warning

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

Go to latest
Published: Mar 22, 2024 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Alerts

type Alerts struct {
	Postmark
	DefaultEmail  string // default email is used when no email is provided
	DefaultRoomID string // default room is used when no room is provided
}

type Command

type Command struct {
	// Name of the command
	Name string
	// Description of the command (user-friendly)
	Description string
	// CMD is actual command to run
	CMD string
	// Log lines to show
	Log int
	// LogOnError to show log only when command failed
	LogOnError bool
	// Migrate command to the following command name
	Migrate string
}

Command config

type Config

type Config struct {
	// Homeserver url
	Homeserver string
	// Login is a MXID localpart (scheduler - OK, @scheduler:example.com - wrong)
	Login string
	// Password for login/password auth only
	Password string
	// RoomID of the admin room
	RoomID id.RoomID
	// OrdersRoomID of the orders room
	OrdersRoomID id.RoomID
	// InventoryPath is a path to the ansible inventory
	InventoryPath string
	// LogLevel for logger
	LogLevel string
	// Sentry DSN
	Sentry string
	// Hetzner config
	Hetzner Hetzner
	// GitPoster config
	GP GP
	// Prometheus Service Discovery config
	PSD PSD
	// Commands map
	Commands map[string]*Command
	// AdminCommands map, the same commands, but visible only in the admin room
	AdminCommands map[string]*Command

	// Alerts config
	Alerts Alerts

	// Reminders config
	Reminders Postmark

	// Followup config
	Followup Postmark

	// Onboarding config
	Onboarding Onboarding

	// Goodbye config
	Goodbye Postmark

	// DB config
	DB DB

	// HTTP config
	HTTP HTTP
}

Config of Scheduler

func New

func New() *Config

New config

type DB

type DB struct {
	// DSN is a database connection string
	DSN string
}

DB config

type GP

type GP struct {
	URL      string
	Login    string
	Password string
}

type HTTP

type HTTP struct {
	*echobasicauth.Auth
	Port string
}

HTTP configuration

type Hetzner

type Hetzner struct {
	DryRun bool
	Cloud  HetznerCloud
	DNS    HetznerDNS
}

Hetzner config

type HetznerCloud

type HetznerCloud struct {
	Token string
}

type HetznerDNS

type HetznerDNS struct {
	Token string
}

type Monitoring

type Monitoring struct {
	SentryDSN string
}

Monitoring config

type Onboarding

type Onboarding struct {
	Postmark
	RoomIDs []string // List of rooms to auto-invite after the setup
	File    string   // Onboarding file
	Token   string   // Postmark Token
	From    string   // From email
	Stream  string   // Postmark Stream
}

type PSD

type PSD struct {
	URL      string
	Login    string
	Password string
}

PSD - Prometheus Service Discovery config

type Postmark

type Postmark struct {
	Token  string `json:"token"`  // Postmark Token
	From   string `json:"from"`   // From email
	Stream string `json:"stream"` // Postmark Stream
}

Postmark config

Jump to

Keyboard shortcuts

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