config

package
v0.0.0-...-7027883 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2022 License: AGPL-3.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {

	// ChainId is the chain id to return in the RPC response.
	ChainId *big.Int `json:"chain_id"`
	// BridgeRPC is the ethereum json rpc to use for bridge data.
	BridgeRPC string `json:"bridge_rpc"`
	// PrivateKey is the base64 encoded libp2p private key.
	PrivateKey string `json:"private_key"`
	// contains filtered or unexported fields
}

func Init

func Init(path string) (Config, error)

Init creates a config with default settings if one does not exist.

func (*Config) ConfigPath

func (c *Config) ConfigPath() string

ConfigPath returns the path to the config file.

func (*Config) DataPath

func (c *Config) DataPath() string

DataPath returns the path to the data directory.

func (*Config) Load

func (c *Config) Load() error

Load loads the config from the root path.

func (*Config) Save

func (c *Config) Save() error

Save writes the config to the root path.

Jump to

Keyboard shortcuts

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