config

package
v0.0.0-...-08f7bcc Latest Latest
Warning

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

Go to latest
Published: Aug 5, 2019 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const ServiceName service.Name = "config"

Variables

This section is empty.

Functions

func Dump

func Dump(config *Config, w io.Writer) error

func ServiceProvider

func ServiceProvider(config *Config) service.Provider

Types

type Config

type Config struct {
	HTTP    HTTPConfig
	LDAP    LDAPConfig
	Contact ContactConfig
}

func From

func From(container *service.Container) (*Config, error)

From retrieves the config service in the given container

func Must

func Must(container *service.Container) *Config

Must retrieves the config service in the given container or panic otherwise

func NewDefault

func NewDefault() *Config

func NewFromFile

func NewFromFile(filepath string) (*Config, error)

NewFromFile retrieves the configuration from the given file

type ContactConfig

type ContactConfig struct {
	Email   string
	Subject string
}

type HTTPConfig

type HTTPConfig struct {
	Address     string
	TemplateDir string
	PublicDir   string
}

type LDAPConfig

type LDAPConfig struct {
	URL                     string
	BaseDN                  string
	UserSearchFilterPattern string
}

Jump to

Keyboard shortcuts

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