configuration

package
v1.9.2 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2024 License: GPL-3.0 Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BotSettings

type BotSettings struct {
	AllowInvites    bool
	MaxUser         int64 `default:"-1"`
	SendReactions   bool
	AllowIcalImport bool
}

BotSettings holds information about the bot itself

type Config

type Config struct {
	Debug            bool `default:"false"`
	MatrixBotAccount Matrix
	MatrixUsers      []string `required:"true"`
	Database         Database
	Webserver        Webserver
	BotSettings      BotSettings
}

Config holds all settings and credentials the application needs

func Load

func Load(files []string) (*Config, error)

Load loads the given configuration files

type Database

type Database struct {
	Connection string `required:"true"`
}

Database holds all data for connection to the database

type Matrix

type Matrix struct {
	Username   string `required:"true"`
	Password   string `required:"true"`
	Homeserver string `required:"true"`
	DeviceID   string `default:"123456"`
	DeviceKey  string `required:"true"`
	E2EE       bool   `default:"false"`
}

Matrix holds the information for accessing the bots account

type Webserver

type Webserver struct {
	Enabled bool
	APIkey  string
	BaseURL string
	Address string `default:":8080"`
}

Webserver holds all data for the webserver

Jump to

Keyboard shortcuts

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