config

package
v0.9.22 Latest Latest
Warning

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

Go to latest
Published: Oct 28, 2024 License: AGPL-3.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Homeserver url
	Homeserver string
	// Login is a localpart if logging in with password (postmoogle) OR full MXID if logging in with shared secret (@postmoogle:example.com)
	Login string
	// Password for login/password auth only
	Password string
	// SharedSecret for login/sharedsecret auth only
	SharedSecret string
	// Domains for SMTP
	Domains []string
	// Port for SMTP
	Port string
	// Proxies is list of trusted SMTP proxies
	Proxies []string
	// RoomID of the admin room
	LogLevel string
	// DataSecret is account data secret key (password) to encrypt all account data values
	DataSecret string
	// NoEncryption disabled encryption support
	NoEncryption bool
	// Prefix for commands
	Prefix string
	// MaxSize of an email (including attachments)
	MaxSize int
	// StatusMsg of the bot
	StatusMsg string
	// Mailboxes config
	Mailboxes Mailboxes
	// Admins holds list of admin users (wildcards supported), e.g.: @*:example.com, @bot.*:example.com, @admin:*. Empty = no admins
	Admins []string

	// DB config
	DB DB

	// PSD config
	PSD PSD

	// TLS config
	TLS TLS

	// Monitoring config
	Monitoring Monitoring

	Relay Relay
}

Config of Postmoogle

func New

func New() *Config

New config

type DB

type DB struct {
	// DSN is a database connection string
	DSN string
	// Dialect of database, one of sqlite3, postgres
	Dialect string
}

DB config

type Mailboxes

type Mailboxes struct {
	Reserved   []string
	Forwarded  []string
	Activation string
}

Mailboxes config

type Monitoring

type Monitoring struct {
	SentryDSN            string
	SentrySampleRate     int
	HealthchecksURL      string
	HealthchecksUUID     string
	HealthchecksDuration time.Duration
}

Monitoring config

type PSD

type PSD struct {
	URL      string
	Login    string
	Password string
}

type Relay

type Relay struct {
	Host     string
	Port     string
	Username string
	Password string
}

Relay config

type TLS

type TLS struct {
	Certs    []string
	Keys     []string
	Port     string
	Required bool
}

TLS config

Jump to

Keyboard shortcuts

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