config

package
v0.0.0-...-8dc1090 Latest Latest
Warning

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

Go to latest
Published: May 10, 2023 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Init

func Init()

Init loads the configuration from disk, creating it if needed

Types

type CORSConfig

type CORSConfig struct {
	Enabled bool
	Origins []string
}

type Config

type Config struct {
	Server   ServerConfig
	Database DatabaseConfig
	Email    EmailConfig
	Redis    RedisConfig
	CORS     CORSConfig
	ErrorLog SlackConfig
	Feedback SlackConfig
	Tasks    TasksConfig
	MIT      MITConfig
	Webauthn WebAuthnConfig
}

func GetCurrent

func GetCurrent() *Config

GetCurrent returns a pointer to the active configuration struct

type DatabaseConfig

type DatabaseConfig struct {
	Host     string
	Username string
	Password string
	Database string
}

type EmailConfig

type EmailConfig struct {
	Enabled      bool
	FromAddress  string
	FromDisplay  string
	SMTPHost     string
	SMTPPort     int
	SMTPSecure   bool
	SMTPUsername string
	SMTPPassword string
}

type MITConfig

type MITConfig struct {
	AuthProxyURL string
	DataProxyURL string
	ProxyToken   string
}

type RedisConfig

type RedisConfig struct {
	Host string
	Port int
}

type ServerConfig

type ServerConfig struct {
	Port               int
	APIURLBase         string
	AppURLBase         string
	ReverseProxyHeader string
	HostName           string
}

type SlackConfig

type SlackConfig struct {
	SlackEnabled    bool
	SlackURL        string
	SlackLogEnabled bool
	SlackLogURL     string
}

type TasksConfig

type TasksConfig struct {
	Slack SlackConfig
}

type WebAuthnConfig

type WebAuthnConfig struct {
	DisplayName string
	RPID        string
	RPOrigin    string
	RPIcon      string
}

Jump to

Keyboard shortcuts

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