config

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

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

Go to latest
Published: Jun 16, 2023 License: AGPL-3.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SaveConfig

func SaveConfig(cfg Config, path string) error

Saves config to file under path

Types

type Config

type Config struct {
	DatabaseUrl                   string     // Database URL
	SmtpConfig                    SMTPConfig // SMTP Client config
	ListenIP                      string     // Hostname:port this server will listen on
	StoragePath                   string     // File storage path
	BackendURL                    string     // Public DNS domain this server is reachable from
	VerificationEmailSubject      string     // String with verification email subject
	VerificationEmailBodyTemplate string     // Template that receives the email verification token
	StaticPath                    string     // Static file path
}

func GetDefaultConfig

func GetDefaultConfig() Config

Returns config with default values

func LoadConfig

func LoadConfig(path string) (Config, error)

Loads config from file under path

type SMTPConfig

type SMTPConfig struct {
	ServerHostname string // SMTP server hostname
	ServerPort     uint16 // SMTP server port
	Username       string // Authorization username
	Password       string // Authorization password
	SenderEmail    string // Email to use in the "From" field
}

SMTP client config

Jump to

Keyboard shortcuts

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