fabric: github.com/hyperledger/fabric/cmd/common Index | Files | Directories

package common

import "github.com/hyperledger/fabric/cmd/common"

Index

Package Files

cli.go config.go

type CLI Uses

type CLI struct {
    // contains filtered or unexported fields
}

CLI defines a command line interpreter

func NewCLI Uses

func NewCLI(name, help string) *CLI

NewCLI creates a new CLI with the given name and help message

func (*CLI) Command Uses

func (cli *CLI) Command(name, help string, onCommand CLICommand) *kingpin.CmdClause

Command adds a new top-level command to the CLI

func (*CLI) Run Uses

func (cli *CLI) Run(args []string)

Run makes the CLI process the arguments and executes the command(s) with the flag(s)

type CLICommand Uses

type CLICommand func(Config) error

CLICommand defines a command that is added to the CLI via an external consumer.

type Config Uses

type Config struct {
    Version      int
    TLSConfig    comm.Config
    SignerConfig signer.Config
}

Config aggregates configuration of TLS and signing

func ConfigFromFile Uses

func ConfigFromFile(file string) (Config, error)

ConfigFromFile loads the given file and converts it to a Config

func (Config) ToFile Uses

func (c Config) ToFile(file string) error

ToFile writes the config into a file

Directories

PathSynopsis
comm
signer

Package common imports 10 packages (graph) and is imported by 3 packages. Updated 2019-08-30. Refresh now. Tools for package owners.