config

package module
v0.0.0-...-c752fc4 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2022 License: MIT Imports: 6 Imported by: 1

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 // "MiningDifficulty":"0"
	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