config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Dec 10, 2018 License: LGPL-3.0, Apache-2.0 Imports: 10 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"
	ARCHIVEDIR = "data/archive"
	// CONFIGFILE is the name of the configuration file name in the runtime path for angine
	CONFIGFILE = "config.toml"
)

Variables

This section is empty.

Functions

func DefaultConfig

func DefaultConfig() (conf *viper.Viper)

func GetConfig

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

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

func InitConfig

func InitConfig(root, chainID string, setConf *viper.Viper) (conf *viper.Viper)

func InitRuntime

func InitRuntime(root string, chainId string, setConf *viper.Viper) error

InitRuntime 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

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