config

package
v2.0.0+incompatible Latest Latest
Warning

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

Go to latest
Published: Jan 30, 2019 License: GPL-3.0 Imports: 12 Imported by: 10

Documentation

Overview

Package config is responsible for managing the configuration of this application. It loads and updates the configuration that is provided by the system administrator that set up this application.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BasePath

func BasePath() string

BasePath returns the configured base path.

func Load

func Load() error

Load loads the configuration or returns an error if something went wrong.

func Version

func Version() string

Version returns the current version of the system.

Types

type Configuration added in v1.0.0

type Configuration struct {
	BasePath             string `` /* 155-byte string literal not displayed */
	Port                 int    `name:"port" usage:"Defines the port number STP will listen to."`
	Host                 string `` /* 126-byte string literal not displayed */
	DataDir              string `` /* 134-byte string literal not displayed */
	Debug                bool   `name:"debug" usage:"Enable this to get more detailed log output. Default is false."`
	SSLRedirect          bool   `name:"sslredirect" usage:"If SSLRedirect is set to true, then only allow HTTPS requests. Default is false."`
	SSLTemporaryRedirect bool   `` /* 134-byte string literal not displayed */
	STSeconds            int64  `` /* 140-byte string literal not displayed */
	STSPreload           bool   `` /* 148-byte string literal not displayed */
	ForceSTSHeader       bool   `` /* 162-byte string literal not displayed */
	FrameDeny            bool   `` /* 129-byte string literal not displayed */
	ContentTypeNosniff   bool   `` /* 147-byte string literal not displayed */
	BrowserXssFilter     bool   `` /* 142-byte string literal not displayed */
	ReferrerPolicy       string `` /* 141-byte string literal not displayed */
	FeaturePolicy        string `` /* 139-byte string literal not displayed */

	CSP string `name:"csp" usage:"CSP header. Default is empty."`
}

Configuration contains the configuration for the system. nolint

func Get added in v1.0.0

func Get() Configuration

Get returns a copy of the configuration.

Jump to

Keyboard shortcuts

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