config

package
v0.0.0-...-a4757fd Latest Latest
Warning

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

Go to latest
Published: Jul 13, 2018 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// RUNTIME_ENV defines the name of the environment variable for runtime path
	RUNTIME_ENV = "ANGINE_RUNTIME"
	// DEFAULT_RUNTIME defines the default path for runtime path relative to $HOME
	DEFAULT_RUNTIME = ".angine"
	// DATADIR is the data dir in the runtime, basically you don't change this never
	DATADIR = "data"
	// CONFIGFILE is the name of the configuration file name in the runtime path for angine
	CONFIGFILE = "config.toml"
)
View Source
const CONFIGTPL = `` /* 772-byte string literal not displayed */

Variables

This section is empty.

Functions

func GetConfig

func GetConfig(root string) (conf *viper.Viper)

GetConfig returns a ready-to-go config instance with all defaults filled in

func InitRuntime

func InitRuntime(root string, chainId string) error

InitRuntimeDir makes all the necessary directorys for angine's runtime and generate the config template for you if it is not there already

func RuntimeDir

func RuntimeDir(root string) string

RuntimeDir determines where the runtime directory is : param > environment > default

func SetDefaults

func SetDefaults(runtime string, conf *viper.Viper) *viper.Viper

SetDefaults sets all the default configs for angine

Types

This section is empty.

Jump to

Keyboard shortcuts

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