config

package
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2020 License: BSD-3-Clause Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const JWTUserKey = "jwt-user"

JWTUserKey is key for JWT claims stored in request context.

Variables

This section is empty.

Functions

func DefaultEnv

func DefaultEnv(key, fallback string) string

DefaultEnv returns content of shell variable assigned to given key. If result is empty, returns fallback value.

func Env

func Env() *models.Config

Env returns pointer to models.Config which is parsed from environmental variables. Cannot be nil. Unset variables will be

Types

type Opener added in v0.2.0

type Opener func(string) ([]byte, error)

Opener is generic function for reading files. For example: Opener can open files from filesystem or files embedded withing binary. Given string could be a path or other indicator.

func MakeOpener added in v0.2.0

func MakeOpener(c *models.Config) Opener

MakeOpener returns opener depending on given config.

Jump to

Keyboard shortcuts

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