config

package
v0.0.0-...-92c45cb Latest Latest
Warning

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

Go to latest
Published: Jan 11, 2025 License: AGPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AppConfig

type AppConfig struct {
	DataDirectory            string
	Port                     string
	IP                       string
	AdministrationHMACSecret *sbytes.SecureBytes
	AdministrationSecretKey  *sstring.SecureString
	GeoLiteDBPath            string
	BannedCountries          []string
}

type BlockchainConfig

type BlockchainConfig struct {
	// ChainID is the unique ID for this blockchain instance.
	ChainID uint16 `json:"chain_id"`

	// TransPerBlock is the maximum number of transactions that can be included in a block.
	TransPerBlock uint16 `json:"trans_per_block"`

	// Difficulty represents how difficult it should be to solve the work problem.
	Difficulty uint16 `json:"difficulty"`

	// ComicCoin: Fee that must be paid for every transaction. This value is provided by the authority.
	TransactionFee uint64 `bson:"transaction_fee" json:"transaction_fee"`

	// (Only set by PoA node)
	ProofOfAuthorityAccountAddress *common.Address
	ProofOfAuthorityWalletMnemonic *sstring.SecureString
	ProofOfAuthorityWalletPath     string
}

BlockchainConfig represents the configuration for the blockchain. It contains settings for the chain ID, transactions per block, difficulty, mining reward, gas price, and units of gas.

type CacheConf

type CacheConf struct {
	URI string
}

type Configuration

type Configuration struct {
	App        AppConfig
	Blockchain BlockchainConfig
	Cache      CacheConf
	DB         DBConfig
}

func NewProvider

func NewProvider() *Configuration

type DBConfig

type DBConfig struct {
	URI  string
	Name string
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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