config

package
v0.0.0-...-42befb5 Latest Latest
Warning

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

Go to latest
Published: Jun 4, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AppUsage              = "the go-spacemesh node"
	AppAuthor             = "The go-spacemesh authors"
	AppAuthorEmail        = "info@spacemesh.io"
	AppCopyrightNotice    = "(c) 2017 The go-spacemesh Authors"
	AccountsDirectoryName = "accounts"
	LogDirectoryName      = "logs"
)

App params are non-configured consts.

Variables

View Source
var (
	// LoadConfigFileFlag used to specify loading app config params from a config file.
	LoadConfigFileFlag = cli.StringFlag{
		Name:        "config, c",
		Usage:       "Load configuration from `FILE`",
		Value:       ConfigValues.ConfigFilePath,
		Destination: &ConfigValues.ConfigFilePath,
	}

	//DataFolderPathFlag specifies app persisted data root directory.
	DataFolderPathFlag = altsrc.NewStringFlag(cli.StringFlag{
		Name:        "data-folder",
		Usage:       "Set root data folder`",
		Value:       ConfigValues.DataFilePath,
		Destination: &ConfigValues.DataFilePath,
	})
)
View Source
var ConfigValues = Config{
	AppIntParam:  20,
	AppBoolParam: true,
	DataFilePath: "~/.spacemesh",
}

ConfigValues defines default values for app config params.

Functions

func NewVersionCommand

func NewVersionCommand(appVersion, branch, commit string) cli.Command

NewVersionCommand is a command factory function to output the app's version. This is an example of an app cli command. To test use `/go-spacemesh version`.

Types

type Config

type Config struct {
	ConfigFilePath string
	AppIntParam    int
	AppBoolParam   bool
	DataFilePath   string
}

Config defines app config params.

Jump to

Keyboard shortcuts

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