config

package
v0.0.0-...-10b9c98 Latest Latest
Warning

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

Go to latest
Published: Jan 22, 2020 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ReadConfig

func ReadConfig(filename string) (err error)

ReadConfig will read a configuration file into the global congiguration structure.

Types

type GlobalConfigData

type GlobalConfigData struct {
	DataDir          string
	MiningReward     int
	MiningDifficulty string
	InitialAccounts  []InitialAccountType
	MiningRewardAcct string
	AcctCoinbase     addr.AddressType `json:"-"`
	ControlAcct      string
	AcctPin          map[string]string // map from 0x00000 -> PIN for auth to use.
}

GlobalConfigData is the gloal configuration data. It holds all the data from the cfg.json file.

func GetGlobalConfig

func GetGlobalConfig() (rv GlobalConfigData)

GetGlobalConfig returns a copy of the global config structure.

type InitialAccountType

type InitialAccountType struct {
	AcctStr string
	Value   int
	Acct    addr.AddressType `json:"-"` // Converted from AcctStr above with validation.
}

Jump to

Keyboard shortcuts

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