command

package
v1.5.6-beta3 Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2023 License: Apache-2.0 Imports: 26 Imported by: 19 modules, 16 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 (
	// 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

func (*ClientCmd) SetDefaultLogLevel added in v1.4.0

func (c *ClientCmd) SetDefaultLogLevel(logLevel string)

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

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 command
	GetClientCfg() *lib.ClientConfig
	// Returns viper instance associated with this command
	GetViper() *viper.Viper
	// Returns the client's home directory
	GetHomeDirectory() string
	// Set the default level to be something other than 'info'
	SetDefaultLogLevel(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