command

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2018 License: Apache-2.0 Imports: 24 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// GetCAInfoCmdUsage is the usage text for getCACert command
	GetCAInfoCmdUsage = "getcainfo -u http://serverAddr:serverPort -M <MSP-directory>"
	// GetCAInfoCmdShortDesc is the short description for getCACert command
	GetCAInfoCmdShortDesc = "Get CA certificate chain and Idemix public key"
)

Variables

This section is empty.

Functions

func RunMain

func RunMain(args []string) error

RunMain is the fabric-ca client main

Types

type ClientCmd

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

ClientCmd encapsulates cobra command that provides command line interface for the Fabric CA client and the configuration used by the Fabric CA client

func NewCommand

func NewCommand(name string) *ClientCmd

NewCommand returns new ClientCmd ready for running

func (*ClientCmd) ConfigInit

func (c *ClientCmd) ConfigInit() error

ConfigInit initializes the configuration for the fabric-ca-client command

func (*ClientCmd) Execute

func (c *ClientCmd) Execute() error

Execute runs this ClientCmd

func (*ClientCmd) GetCfgFileName

func (c *ClientCmd) GetCfgFileName() string

GetCfgFileName returns name of the client command configuration file

func (*ClientCmd) GetClientCfg

func (c *ClientCmd) GetClientCfg() *lib.ClientConfig

GetClientCfg returns client configuration

func (*ClientCmd) GetHomeDirectory

func (c *ClientCmd) GetHomeDirectory() string

GetHomeDirectory returns the client's home directory

func (*ClientCmd) GetViper

func (c *ClientCmd) GetViper() *viper.Viper

GetViper returns the viper instance

func (*ClientCmd) LoadMyIdentity

func (c *ClientCmd) LoadMyIdentity() (*lib.Identity, error)

LoadMyIdentity loads the client's identity

type Command

type Command interface {
	// Initializes the client command configuration
	ConfigInit() error
	// Returns the name of the configuration file
	GetCfgFileName() string
	// Loads the credentials of an identity that are in the msp directory specified to this command
	LoadMyIdentity() (*lib.Identity, error)
	// Returns lib.ClientCfg instance associated with this comamnd
	GetClientCfg() *lib.ClientConfig
	// Returns viper instance associated with this comamnd
	GetViper() *viper.Viper
	GetHomeDirectory() string
}

Command interface initializes client command and loads an identity

Directories

Path Synopsis
Code generated by mockery v1.0.0.
Code generated by mockery v1.0.0.

Jump to

Keyboard shortcuts

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