settings

package
v0.0.0-...-765978f Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2015 License: MIT Imports: 4 Imported by: 3

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetEnvironment

func GetEnvironment() string

GetEnvironment returns the current environment

func Init

func Init()

Init get the environments value from flags, default fall back is development.

func IsTestEnvironment

func IsTestEnvironment() bool

IsTestEnvironment check if the current environment is test

func LoadSettingsByEnv

func LoadSettingsByEnv(env string)

LoadSettingsByEnv load the .toml setting files from ~/.config/vantaa/<environment>.toml.

Types

type Settings

type Settings struct {
	HashCost           int
	JWTExpirationDelta int
	DbUrl              string
	PrivateKeyPath     string
	PublicKeyPath      string
	// contains filtered or unexported fields
}

Settings defines the Settings struct.

func Get

func Get() Settings

Get gets and return Settings according to the configuration files

Jump to

Keyboard shortcuts

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