Documentation ¶
Overview ¶
Package opts provides miscellaneous configurable globals commonly required by web application servers.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BaseDir string
Base directory. Some files may be looked for relative to this directory; templates, assets, etc.
Configurable 'basedir'.
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'.
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'.
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'.
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 ¶
Gets a 32-byte variant secret key, derived using the given name.
Types ¶
This section is empty.