...

Package command

import "github.com/hyperledger/fabric-ca/cmd/fabric-ca-client/command"
Overview
Index
Subdirectories

Overview ▾

Constants

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

func RunMain(args []string) error

RunMain is the fabric-ca client main

type ClientCmd

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

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

func (*ClientCmd) SetDefaultLogLevel

func (c *ClientCmd) SetDefaultLogLevel(logLevel string)

SetDefaultLogLevel sets the default log level for a command to a specific level

type Command

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)
}

Subdirectories

Name Synopsis
..
mocks Code generated by mockery v1.0.0.