env

package
v0.17.1 Latest Latest
Warning

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

Go to latest
Published: Dec 21, 2018 License: GPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Current

func Current() string

Current returns current Fider environment

func Etc added in v0.13.0

func Etc(p ...string) string

Etc returns a path to a folder or file inside the /etc/ folder

func GetEnvOrDefault

func GetEnvOrDefault(name string, defaultValue string) string

GetEnvOrDefault retrieves the value of the environment variable named by the key. It returns the value if available, otherwise returns defaultValue

func GetPublicIP added in v0.13.0

func GetPublicIP() (string, error)

GetPublicIP returns the public IP of current hosting server

func HasLegal added in v0.13.0

func HasLegal() bool

HasLegal returns true if current instance contains legal documents: privacy.md and terms.md

func IsDefined added in v0.6.0

func IsDefined(name string) bool

IsDefined returns true if given environment variable is defined

func IsDevelopment

func IsDevelopment() bool

IsDevelopment returns true on Fider production environment

func IsProduction

func IsProduction() bool

IsProduction returns true on Fider production environment

func IsSingleHostMode

func IsSingleHostMode() bool

IsSingleHostMode returns true if host mode is set to single tenant

func IsTest

func IsTest() bool

IsTest returns true on Fider test environment

func Mode

func Mode() string

Mode returns HOST_MODE or its default value

func MultiTenantDomain

func MultiTenantDomain() string

MultiTenantDomain returns domain name of current instance for multi tenant hosts

func MustGet

func MustGet(name string) string

MustGet returns environment variable or panic

func Path

func Path(p ...string) string

Path returns root path of project + given path

func Subdomain added in v0.14.0

func Subdomain(host string) string

Subdomain returns the Fider subdomain (if available) from given host

Types

This section is empty.

Jump to

Keyboard shortcuts

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