plgbftsecrets

package
v0.0.1 Latest Latest
Warning

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

Go to latest
Published: May 23, 2023 License: Apache-2.0 Imports: 12 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

View Source
const (
	AccountDirFlag    = "data-dir"
	AccountConfigFlag = "config"

	AccountDirFlagDesc    = "the directory for the Go Plgchain data if the local FS is used"
	AccountConfigFlagDesc = "the path to the SecretsManager config file, if omitted, the local FS secrets manager is used"
)

common flags for all plgbft commands

Variables

View Source
var (
	ErrInvalidNum                     = fmt.Errorf("num flag value should be between 1 and %d", maxInitNum)
	ErrInvalidConfig                  = errors.New("invalid secrets configuration")
	ErrInvalidParams                  = errors.New("no config file or data directory passed in")
	ErrUnsupportedType                = errors.New("unsupported secrets manager")
	ErrSecureLocalStoreNotImplemented = errors.New(
		"use a secrets backend, or supply an --insecure flag " +
			"to store the private keys locally on the filesystem, " +
			"avoid doing so in production")
)

common errors for all plgbft commands

Functions

func GetCommand

func GetCommand() *cobra.Command

func GetSecretsManager

func GetSecretsManager(dataPath, configPath string, insecureLocalStore bool) (secrets.SecretsManager, error)

GetSecretsManager function resolves secrets manager instance based on provided data or config paths. insecureLocalStore defines if utilization of local secrets manager is allowed.

Types

type Results

type Results []command.CommandResult

func (Results) GetOutput

func (r Results) GetOutput() string

type SecretsInitResult

type SecretsInitResult struct {
	Address       types.Address `json:"address"`
	BLSPubkey     string        `json:"bls_pubkey"`
	NodeID        string        `json:"node_id"`
	PrivateKey    string        `json:"private_key"`
	BLSPrivateKey string        `json:"bls_private_key"`
	BLSSignature  string        `json:"bls_signature"`
	Insecure      bool          `json:"insecure"`
	Generated     string        `json:"generated"`
}

func (*SecretsInitResult) GetOutput

func (r *SecretsInitResult) GetOutput() string

Jump to

Keyboard shortcuts

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