opts

package
v0.0.0-...-8fa2440 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2016 License: MIT Imports: 6 Imported by: 0

Documentation

Overview

Package opts provides miscellaneous configurable globals commonly required by web application servers.

Index

Constants

This section is empty.

Variables

View Source
var BaseDir string

Base directory. Some files may be looked for relative to this directory; templates, assets, etc.

Configurable 'basedir'.

View Source
var BaseDomain string

Base domain. This may be used in circumstances in which an URL is not appropriate, but rather a domain name is needed.

Configurable 'basedomain'.

View Source
var BaseURL string

Base URL. This is the canonical base URL, which will be used in e.g. e. mails. It should not have a trailing slash.

Configurable 'baseurl'.

View Source
var DevMode bool

Development mode? In development mode, the application server may behave differently. Errors may be reported differently, assets may be reloaded automatically, etc.

Configurable 'devmode'.

View Source
var _, Log = xlog.New("web.opts")

Functions

func SecretKey

func SecretKey() []byte

Returns the application secret key. If none is configured, a random, temporary secret key is generated.

func VariantSecretKey

func VariantSecretKey(name string) []byte

Gets a 32-byte variant secret key, derived using the given name.

Types

This section is empty.

Jump to

Keyboard shortcuts

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