config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Jun 14, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DefaultNetworkHome

func DefaultNetworkHome() (string, error)

Types

type Config

type Config struct {
	OutputDir            *string       `hcl:"-"`
	VegaBinary           *string       `hcl:"vega_binary_path"`
	Prefix               *string       `hcl:"prefix"`
	NodeDirPrefix        *string       `hcl:"node_dir_prefix"`
	TendermintNodePrefix *string       `hcl:"tendermint_node_prefix"`
	VegaNodePrefix       *string       `hcl:"vega_node_prefix"`
	DataNodePrefix       *string       `hcl:"data_node_prefix"`
	WalletPrefix         *string       `hcl:"wallet_prefix"`
	FaucetPrefix         *string       `hcl:"faucet_prefix"`
	Network              NetworkConfig `hcl:"network,block"`
	// contains filtered or unexported fields
}

func DefaultConfig

func DefaultConfig() (*Config, error)

func ParseConfigFile

func ParseConfigFile(filePath, outputDir string) (*Config, error)

func (*Config) Persist

func (c *Config) Persist() error

func (Config) SmartContractsInfo

func (c Config) SmartContractsInfo() (*types.SmartContractsInfo, error)

func (*Config) Validate

func (c *Config) Validate(configDir string) error

type ConfigTemplates

type ConfigTemplates struct {
	Vega           *string `hcl:"vega,optional"`
	VegaFile       *string `hcl:"vega_file,optional"`
	Tendermint     *string `hcl:"tendermint,optional"`
	TendermintFile *string `hcl:"tendermint_file,optional"`
	DataNode       *string `hcl:"data_node,optional"`
	DataNodeFile   *string `hcl:"data_node_file,optional"`
}

type DockerConfig

type DockerConfig struct {
	Name         string            `hcl:"name,label"`
	Image        string            `hcl:"image"`
	Command      string            `hcl:"cmd"`
	Args         []string          `hcl:"args"`
	Env          map[string]string `hcl:"env,optional"`
	StaticPort   *StaticPort       `hcl:"static_port,block"`
	AuthSoftFail bool              `hcl:"auth_soft_fail,optional"`
}

type EthereumConfig

type EthereumConfig struct {
	ChainID   string `hcl:"chain_id"`
	NetworkID string `hcl:"network_id"`
	Endpoint  string `hcl:"endpoint"`
}

type FaucetConfig

type FaucetConfig struct {
	Name     string `hcl:"name,label"`
	Pass     string `hcl:"wallet_pass"`
	Template string `hcl:"template,optional"`
}

type NetworkConfig

type NetworkConfig struct {
	Name                string         `hcl:"name,label"`
	GenesisTemplate     *string        `hcl:"genesis_template"`
	GenesisTemplateFile *string        `hcl:"genesis_template_file"`
	Ethereum            EthereumConfig `hcl:"ethereum,block"`
	Wallet              *WalletConfig  `hcl:"wallet,block"`
	Faucet              *FaucetConfig  `hcl:"faucet,block"`

	PreStart  *PStartConfig `hcl:"pre_start,block"`
	PostStart *PStartConfig `hcl:"post_start,block"`

	Nodes                       []NodeConfig `hcl:"node_set,block"`
	SmartContractsAddresses     *string      `hcl:"smart_contracts_addresses,optional"`
	SmartContractsAddressesFile *string      `hcl:"smart_contracts_addresses_file,optional"`
}

func (NetworkConfig) GetNodeConfig

func (nc NetworkConfig) GetNodeConfig(name string) (*NodeConfig, error)

type NodeConfig

type NodeConfig struct {
	Name               string `hcl:"name,label"`
	Mode               string `hcl:"mode"`
	Count              int    `hcl:"count"`
	NodeWalletPass     string `hcl:"node_wallet_pass,optional"`
	EthereumWalletPass string `hcl:"ethereum_wallet_pass,optional"`
	VegaWalletPass     string `hcl:"vega_wallet_pass,optional"`
	DataNodeBinary     string `hcl:"data_node_binary,optional"`

	ConfigTemplates      ConfigTemplates `hcl:"config_templates,block"`
	NomadJobTemplate     *string         `hcl:"nomad_job_template,optional"`
	NomadJobTemplateFile *string         `hcl:"nomad_job_template_file,optional"`
}

type PStartConfig

type PStartConfig struct {
	Docker []DockerConfig `hcl:"docker_service,block"`
}

type StaticPort

type StaticPort struct {
	To    int `hcl:"to,optional"`
	Value int `hcl:"value"`
}

type WalletConfig

type WalletConfig struct {
	Name     string `hcl:"name,label"`
	Binary   string `hcl:"binary"`
	Template string `hcl:"template,optional"`
}

Jump to

Keyboard shortcuts

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