config

package
v1.4.2 Latest Latest
Warning

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

Go to latest
Published: Jul 23, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Ban added in v1.1.0

type Ban struct {
	Size int
	List []string
}

Ban config

type Config

type Config struct {
	// Homeserver url
	Homeserver string
	// Login is a MXID localpart (buscarron - OK, @buscarron:example.com - wrong)
	Login string
	// Password for login/password auth only
	Password string
	// LogLevel for logger
	LogLevel string
	// NoEncryption disables encryption
	NoEncryption bool
	// Port of the web server
	Port string
	// Metrics config
	Metrics echobasicauth.Auth
	// Redmine config
	Redmine Redmine
	// Forms map
	Forms map[string]*Form
	// Spamlist with wildcards
	Spamlist []string
	// Ban config
	Ban *Ban

	// PSD config
	PSD PSD

	// DB config
	DB DB

	// Sentry DSN
	Sentry string
	// Healthchecks.io config
	Healthchecks Healthchecks

	// Postmark config
	Postmark *Postmark

	// SMTP config
	SMTP *SMTP
}

Config of Buscarron

func New

func New() *Config

New config

type Confirmation added in v1.1.0

type Confirmation struct {
	// Subject of the confirmation email
	Subject string
	// Body of the confirmation email
	Body string
}

Confirmation email config

type DB

type DB struct {
	// DSN is a database connection string
	DSN string
	// Dialect of the db, allowed values: postgres, sqlite3
	Dialect string
}

DB config

type Form

type Form struct {
	// Name of the form
	Name string
	// Redirect is an url to redirect after submission
	Redirect string
	// RejectRedirect is an url to redirect after a rejected submission (both rate limit and spam)
	RejectRedirect string
	// RoomID to send submission
	RoomID id.RoomID
	// Ratelimit config
	Ratelimit string
	// RatelimitShared means that rate limit will be shared across other forms with that option enabled
	RatelimitShared bool
	// HasDomain enforces "domain" field check
	HasDomain bool
	// HasEmail enforces "email" field check
	HasEmail bool
	// Text template
	Text string
	// Confirmation email config
	Confirmation Confirmation
	// Extensions list
	Extensions []string
}

Form config

type Healthchecks added in v1.4.1

type Healthchecks struct {
	URL  string
	UUID string
}

Healthchecks.io config

type PSD added in v1.4.1

type PSD struct {
	URL      string
	Login    string
	Password string
}

PSD config

type Postmark added in v1.1.0

type Postmark struct {
	Token   string
	From    string
	ReplyTo string
}

Postmark config

type Redmine added in v1.4.2

type Redmine struct {
	Host      string
	APIKey    string
	ProjectID string
	TrackerID int
	StatusID  int
}

type SMTP added in v1.3.0

type SMTP struct {
	From              string
	EnforceValidation bool
}

SMTP config

Jump to

Keyboard shortcuts

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