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(_ *env.Env, logger *logging.Logger, _, binary string, args []string, ...) (*exec.Cmd, error)
- type Config
- type ConsensusHelpers
- type Factory
- type GenesisHelpers
- type Helpers
- type KeymanagerHelpers
- func (k *KeymanagerHelpers) GenUpdate(nonce uint64, polPath string, polSigPaths []string, txPath string) error
- func (k *KeymanagerHelpers) InitPolicy(runtimeID common.Namespace, serial uint32, rotationInterval beacon.EpochTime, ...) error
- func (k *KeymanagerHelpers) SignPolicy(testKey, polPath, polSigPath string) error
- 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 GenesisHelpers ¶ added in v0.2300.0
type GenesisHelpers struct {
// contains filtered or unexported fields
}
GenesisHelpers contains the oasis-node genesis CLI helpers.
func (*GenesisHelpers) Check ¶ added in v0.2300.0
func (g *GenesisHelpers) Check( genesisFilePath string, ) (string, error)
Check is a wrapper for "genesis check" subcommand.
func (*GenesisHelpers) Dump ¶ added in v0.2300.0
func (g *GenesisHelpers) Dump( genesisFilePath string, ) error
Dump is a wrapper for "genesis dump" subcommand.
type Helpers ¶
type Helpers struct { Consensus *ConsensusHelpers Registry *RegistryHelpers Keymanager *KeymanagerHelpers Genesis *GenesisHelpers // 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, rotationInterval beacon.EpochTime, policies map[sgx.EnclaveIdentity]*secrets.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) GenerateRegisterEntityTx ¶ added in v0.2300.0
func (r *RegistryHelpers) GenerateRegisterEntityTx( entDir string, nonce uint64, txPath string, ) error
GenerateRegisterEntityTx is a wrapper for "registry entity gen_register" subcommand.
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.