config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 17, 2018 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewFromFile

func NewFromFile(file string, env string, config interface{}) error

Types

type ArcadeumConfig

type ArcadeumConfig struct {
	EtherscanPriceURL string     `toml:"etherscan_price_url"` // endpoint to get latest ETH/USD price
	MinStakeUSD       float32    `toml:"min_stake_usd"`
	ContractAddress   string     `toml:"contract_address"` // arcadeum contract address
	Games             []GameInfo `toml:"games"`
}

type Config

type Config struct {
	ENV            ENVConfig      `toml:"env"`
	MatcherConfig  MatcherConfig  `toml:"matcher"`
	ETHConfig      ETHConfig      `toml:"eth"`
	ArcadeumConfig ArcadeumConfig `toml:"arcadeum"`
	RedisConfig    RedisConfig    `toml:"redis"`
}

type ENVConfig

type ENVConfig struct {
	Mode        string `toml:"mode"`
	Environment string `toml:"environment"`
	DebugMode   bool   `toml:"debug_mode"`
	Port        int    `toml:"port"`
	TLSEnabled  bool   `toml:"tls_enabled"`
	TLSCertFile string `toml:"tls_cert_file"`
	TLSKeyFile  string `toml:"tls_key_file"`
}

type ETHConfig

type ETHConfig struct {
	NodeURL string `toml:"node_url"`
}

type GameInfo

type GameInfo struct {
	ID              uint32 `toml:"id"`
	Name            string `toml:"name"`
	ContractAddress string `toml:"contract_address"`
}

type MatcherConfig

type MatcherConfig struct {
	AccountAddress common.Address // Ethereum address of account associated with this private key (derived)
	PrivKeyFile    string         `toml:"priv_key_file"`
}

type RedisConfig

type RedisConfig struct {
	Address  string `toml:"address"`
	Password string `toml:"password"`
}

Jump to

Keyboard shortcuts

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