config

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2023 License: GPL-3.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultConfigPath = filepath.Join(defaultDataDirectory, defaultConfigFilename) // Default configuration path

)

Functions

This section is empty.

Types

type Configuration

type Configuration interface {
	serve.Options // The configuration should provide every settings needed by the seelf server

	Initialize(log.ConfigurableLogger, string) error // Initialize the configuration by loading it (from config file, env vars, etc.)
}

Configuration used to configure seelf commands.

func Default

func Default(builders ...ConfigurationBuilder) Configuration

Instantiate the default seelf configuration.

type ConfigurationBuilder

type ConfigurationBuilder func(*configuration)

Configuration builder function used to initialize the configuration object (mostly used in tests).

func WithBalancer

func WithBalancer(domain, acmeEmail string) ConfigurationBuilder

Configure the balancer for the given domain and acme email.

func WithTestDefaults

func WithTestDefaults() ConfigurationBuilder

Configuration builder used to set some tests sensible defaults. Generates a random data directory path to avoid conflicts with other tests.

Jump to

Keyboard shortcuts

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