Documentation ¶
Overview ¶
Package cli contains helpers for various oasis-node subcommands.
Index ¶
- func RunSubCommand(env *env.Env, logger *logging.Logger, name, binary string, args []string) error
- func RunSubCommandWithOutput(env *env.Env, logger *logging.Logger, name, binary string, args []string) (bytes.Buffer, error)
- func StartSubCommand(childEnv *env.Env, logger *logging.Logger, name, binary string, args []string, ...) (*exec.Cmd, error)
- type Config
- type ConsensusHelpers
- type Factory
- type Helpers
- type KeymanagerHelpers
- type RegistryHelpers
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func RunSubCommand ¶
RunSubCommand launches an oasis-node subcommand and waits for it to complete.
Stdout and stderr are redirected into a command-specific file.
Types ¶
type Config ¶
type Config struct { // NodeBinary is the path to the oasis-node binary file. NodeBinary string // GenesisFile is the path to the genesis document. GenesisFile string // NodeSocketPath is the path to the internal UNIX socket of a node that should be used for any // commands which require talking to a working oasis-node. NodeSocketPath string }
Config is the CLI helper configuration.
type ConsensusHelpers ¶
type ConsensusHelpers struct {
// contains filtered or unexported fields
}
ConsensusHelpers contains the oasis-node consensus CLI helpers.
func (*ConsensusHelpers) EstimateGas ¶
func (c *ConsensusHelpers) EstimateGas(txPath string, signerPub signature.PublicKey) (transaction.Gas, error)
EstimateGas is a wrapper for "consensus estimate_gas" subcommand.
func (*ConsensusHelpers) SubmitTx ¶
func (c *ConsensusHelpers) SubmitTx(txPath string) error
SubmitTx is a wrapper for "consensus submit_tx" subcommand.
type Factory ¶
type Factory interface { // GetCLIConfig returns the configuration required for constructing a CLI helper. GetCLIConfig() Config }
Factory is an interface that can be used to construct CLI helpers.
type Helpers ¶
type Helpers struct { Consensus *ConsensusHelpers Registry *RegistryHelpers Keymanager *KeymanagerHelpers // contains filtered or unexported fields }
Helpers are the oasis-node cli helpers.
type KeymanagerHelpers ¶
type KeymanagerHelpers struct {
// contains filtered or unexported fields
}
KeymanagerHelpers contains the oasis-node keymanager CLI helpers.
func (*KeymanagerHelpers) GenUpdate ¶
func (k *KeymanagerHelpers) GenUpdate(nonce uint64, polPath string, polSigPaths []string, txPath string) error
GenUpdate generates the update KM policy transaction.
func (*KeymanagerHelpers) InitPolicy ¶
func (k *KeymanagerHelpers) InitPolicy(runtimeID common.Namespace, serial uint32, policies map[sgx.EnclaveIdentity]*keymanager.EnclavePolicySGX, polPath string) error
InitPolicy generates the KM policy file.
func (*KeymanagerHelpers) SignPolicy ¶
func (k *KeymanagerHelpers) SignPolicy(testKey, polPath, polSigPath string) error
SignPolicy signs the KM policy file using the given test key ("1", "2", or "3").
type RegistryHelpers ¶
type RegistryHelpers struct {
// contains filtered or unexported fields
}
RegistryHelpers contains the oasis-node registry CLI helpers.
func (*RegistryHelpers) GenerateRegisterRuntimeTx ¶
func (r *RegistryHelpers) GenerateRegisterRuntimeTx( baseDir string, runtime registry.Runtime, nonce uint64, txPath string, ) error
GenerateRegisterRuntimeTx is a wrapper for "registry runtime gen_register" subcommand.