Documentation
¶
Index ¶
- func Alarm() *alarm.Alarm
- func Cookie() http.Cookie
- func DeployName() string
- func Dir() string
- func Env() *config.Environment
- func ExternalURL() *url.URL
- func ExternalURLIsHTTPS() bool
- func Get(key string) strmap.StrMap
- func GetDBConfig(typ, key string) interface{}
- func GetSlice(key string) []strmap.StrMap
- func GetString(key string) string
- func GetStringSlice(key string) []string
- func HttpLogger() *loggerPkg.Logger
- func Keepers() []string
- func Logger() *loggerPkg.Logger
- func Mailer() *mailer.Mailer
- func Name() string
- func NewLogger(paths ...string) *loggerPkg.Logger
- func NewLoggerFromWriter(writer io.Writer) *loggerPkg.Logger
- func Protect(fn func())
- func Root() string
- func Secret() string
- func TimeZone() *time.Location
- func TimestampSign(timestamp int64) string
Examples ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DeployName ¶
func DeployName() string
func Env ¶
func Env() *config.Environment
func ExternalURL ¶ added in v0.0.7
Example ¶
fmt.Println(ExternalURL().String())
Output: https://example.com/home
func ExternalURLIsHTTPS ¶ added in v0.0.8
func ExternalURLIsHTTPS() bool
func GetDBConfig ¶ added in v0.0.6
func GetDBConfig(typ, key string) interface{}
func GetStringSlice ¶
func HttpLogger ¶
func Root ¶
func Root() string
Example ¶
root := Root() fmt.Println(strings.HasSuffix(root, "/config/release/img-app"))
Output: true
func TimestampSign ¶
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.