config

package
v0.0.0-...-96e5f69 Latest Latest
Warning

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

Go to latest
Published: May 8, 2020 License: MIT Imports: 6 Imported by: 4

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:"-"`
}

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