webconfig

package
v0.0.24 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2020 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package for web app configuration

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DBConfig

func DBConfig() string

Get the configuration string to connect to the database

func GetAll

func GetAll() map[string]string

Gets all configuration variables

func GetCnReaderHome

func GetCnReaderHome() string

The home directory of the Chinese Notes project

func GetCnWebHome

func GetCnWebHome() string

The home directory of the web application

func GetEnvIntValue

func GetEnvIntValue(key string, defValue int) int

func GetFromEmail

func GetFromEmail() string

Get environment variable for sending email from

func GetPasswordResetURL

func GetPasswordResetURL() string

Get the domain name of the site

func GetPort

func GetPort() int

Get environment variable for serving port

func GetSiteDomain

func GetSiteDomain() string

Get the domain name of the site

func GetVar

func GetVar(key string) string

Gets a configuration variable value

func GetVarWithDefault added in v0.0.17

func GetVarWithDefault(key, defaultVal string) string

Gets a configuration value with given default

func InitWeb added in v0.0.24

func InitWeb() error

func PasswordProtected added in v0.0.17

func PasswordProtected() bool

PasswordProtected gets whether the web site is password projected.

func UseDatabase added in v0.0.17

func UseDatabase() bool

PasswordProtected gets whether the web site is password projected.

Types

This section is empty.

Jump to

Keyboard shortcuts

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