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"
)
func RunMain(args []string) error
RunMain is the fabric-ca client main
ClientCmd encapsulates cobra command that provides command line interface for the Fabric CA client and the configuration used by the Fabric CA client
type ClientCmd struct {
// contains filtered or unexported fields
}
func NewCommand(name string) *ClientCmd
NewCommand returns new ClientCmd ready for running
func (c *ClientCmd) ConfigInit() error
ConfigInit initializes the configuration for the fabric-ca-client command
func (c *ClientCmd) Execute() error
Execute runs this ClientCmd
func (c *ClientCmd) GetCfgFileName() string
GetCfgFileName returns name of the client command configuration file
func (c *ClientCmd) GetClientCfg() *lib.ClientConfig
GetClientCfg returns client configuration
func (c *ClientCmd) GetHomeDirectory() string
GetHomeDirectory returns the client's home directory
func (c *ClientCmd) GetViper() *viper.Viper
GetViper returns the viper instance
func (c *ClientCmd) LoadMyIdentity() (*lib.Identity, error)
LoadMyIdentity loads the client's identity
func (c *ClientCmd) SetDefaultLogLevel(logLevel string)
SetDefaultLogLevel sets the default log level for a command to a specific level
Command interface initializes client command and loads an identity
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
// Returns the client's home directoty
GetHomeDirectory() string
// Set the default level to be something other than 'info'
SetDefaultLogLevel(string)
}