config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Dec 25, 2018 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureRoot

func EnsureRoot(rootDir string)

EnsureRoot creates the root, config, and data directories if they don't exist, and panics if it fails.

func WriteConfigFile

func WriteConfigFile(configFilePath string, config *CLIConfig)

WriteConfigFile renders config using the template and writes it to configFilePath.

Types

type CLIConfig

type CLIConfig struct {
	QOSChainID          string `mapstructure:"qos_chain_id"`
	QSCChainID          string `mapstructure:"qsc_chain_id"`
	RootDir             string `mapstructure:"home"`
	QOSNodeURI          string `mapstructure:"qos_node_uri"`
	QSTARSNodeURI       string `mapstructure:"qstars_node_uri"`
	DirectTOQOS         bool   `mapstructure:"direct_to_qos"`
	WaitingForQosResult string `mapstructure:"waiting_for_qos_result"`

	Community   string `mapstructure:"community"`
	Authormock  string `mapstructure:"authormock"`
	Adbuyermock string `mapstructure:"adbuyermock"`
	Banker      string `mapstructure:"banker"`
	Dappowner   string `mapstructure:"dappowner"`
}

func DefaultConfig

func DefaultConfig() *CLIConfig

func InterceptLoadConfig

func InterceptLoadConfig() (conf *CLIConfig, err error)

If a new config is created, change some of the default tendermint settings

func ParseConfig

func ParseConfig() (*CLIConfig, error)

ParseConfig retrieves the default environment configuration, sets up the Tendermint root and ensures that the root exists

type QStarsClientContext

type QStarsClientContext struct {
	QOSCliContext *context.CLIContext
	QSCCliContext *context.CLIContext
	Config        *CLIConfig
}
var Clictx QStarsClientContext

func CreateCLIContextTwo

func CreateCLIContextTwo(cdc *wire.Codec, cfg *CLIConfig) QStarsClientContext

func GetCLIContext

func GetCLIContext() QStarsClientContext

type ServerConf

type ServerConf struct {
	QStarsPrivateKey   string `toml:"QStarsPrivateKey"`
	QStarsTransactions string `toml:"QStarsTransactions"`
	QOSChainName       string `toml:"QOSChainName"`
	RootDir            string `toml:"RootDir"`
	Community          string `mapstructure:"community"`
}

qstars configuration file QStarsPrivateKey qstars privatekey QStarsTransactions TBD

func GetServerConf

func GetServerConf() *ServerConf

func Init

func Init(filename string, rootDir string) (p *ServerConf, err error)

Jump to

Keyboard shortcuts

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