cli

package
v0.0.0-...-11d2657 Latest Latest
Warning

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

Go to latest
Published: Oct 5, 2023 License: GPL-3.0 Imports: 51 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CodeBlock

func CodeBlock(lines []string) string

Create a Markdown code block from a slice of string, where each string is a line of code

func Commands

func Commands() map[string]MarkDownCommandFactory

func Run

func Run(args []string) int

Types

type Account

type Account struct {
	UI cli.Ui
}

func (*Account) Help

func (a *Account) Help() string

Help implements the cli.Command interface

func (*Account) MarkDown

func (a *Account) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*Account) Run

func (a *Account) Run(args []string) int

Run implements the cli.Command interface

func (*Account) Synopsis

func (a *Account) Synopsis() string

Synopsis implements the cli.Command interface

type AccountImportCommand

type AccountImportCommand struct {
	*Meta
}

func (*AccountImportCommand) Flags

func (a *AccountImportCommand) Flags() *flagset.Flagset

func (*AccountImportCommand) Help

func (a *AccountImportCommand) Help() string

Help implements the cli.Command interface

func (*AccountImportCommand) MarkDown

func (a *AccountImportCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*AccountImportCommand) Run

func (a *AccountImportCommand) Run(args []string) int

Run implements the cli.Command interface

func (*AccountImportCommand) Synopsis

func (a *AccountImportCommand) Synopsis() string

Synopsis implements the cli.Command interface

type AccountListCommand

type AccountListCommand struct {
	*Meta
}

func (*AccountListCommand) Flags

func (a *AccountListCommand) Flags() *flagset.Flagset

func (*AccountListCommand) Help

func (a *AccountListCommand) Help() string

Help implements the cli.Command interface

func (*AccountListCommand) MarkDown

func (a *AccountListCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*AccountListCommand) Run

func (a *AccountListCommand) Run(args []string) int

Run implements the cli.Command interface

func (*AccountListCommand) Synopsis

func (a *AccountListCommand) Synopsis() string

Synopsis implements the cli.Command interface

type AccountNewCommand

type AccountNewCommand struct {
	*Meta
}

func (*AccountNewCommand) Flags

func (a *AccountNewCommand) Flags() *flagset.Flagset

func (*AccountNewCommand) Help

func (a *AccountNewCommand) Help() string

Help implements the cli.Command interface

func (*AccountNewCommand) MarkDown

func (a *AccountNewCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*AccountNewCommand) Run

func (a *AccountNewCommand) Run(args []string) int

Run implements the cli.Command interface

func (*AccountNewCommand) Synopsis

func (a *AccountNewCommand) Synopsis() string

Synopsis implements the cli.Command interface

type AttachCommand

type AttachCommand struct {
	UI            cli.Ui
	Meta          *Meta
	Meta2         *Meta2
	ExecCMD       string
	Endpoint      string
	PreloadJSFlag string
	JSpathFlag    string
}

AttachCommand is the command to Connect to remote Bor IPC console

func (*AttachCommand) Flags

func (c *AttachCommand) Flags() *flagset.Flagset

func (*AttachCommand) Help

func (c *AttachCommand) Help() string

Help implements the cli.Command interface

func (*AttachCommand) MarkDown

func (c *AttachCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*AttachCommand) Run

func (c *AttachCommand) Run(args []string) int

Run implements the cli.Command interface

func (*AttachCommand) Synopsis

func (c *AttachCommand) Synopsis() string

Synopsis implements the cli.Command interface

type BootnodeCommand

type BootnodeCommand struct {
	UI cli.Ui
	// contains filtered or unexported fields
}

func (*BootnodeCommand) Flags

func (b *BootnodeCommand) Flags() *flagset.Flagset

func (*BootnodeCommand) Help

func (b *BootnodeCommand) Help() string

Help implements the cli.Command interface

func (*BootnodeCommand) MarkDown

func (c *BootnodeCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*BootnodeCommand) Run

func (b *BootnodeCommand) Run(args []string) int

Run implements the cli.Command interface nolint: gocognit

func (*BootnodeCommand) Synopsis

func (b *BootnodeCommand) Synopsis() string

Synopsis implements the cli.Command interface

type BorFingerprint

type BorFingerprint struct {
	CoresCount    int            `json:"coresCount"`
	OsName        string         `json:"osName"`
	OsVer         string         `json:"osVer"`
	DiskDetails   *DiskDetails   `json:"diskDetails"`
	MemoryDetails *MemoryDetails `json:"memoryDetails"`
}

type ChainCommand

type ChainCommand struct {
	UI cli.Ui
}

ChainCommand is the command to group the peers commands

func (*ChainCommand) Help

func (c *ChainCommand) Help() string

Help implements the cli.Command interface

func (*ChainCommand) MarkDown

func (c *ChainCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*ChainCommand) Run

func (c *ChainCommand) Run(args []string) int

Run implements the cli.Command interface

func (*ChainCommand) Synopsis

func (c *ChainCommand) Synopsis() string

Synopsis implements the cli.Command interface

type ChainSetHeadCommand

type ChainSetHeadCommand struct {
	*Meta2
	// contains filtered or unexported fields
}

ChainSetHeadCommand is the command to group the peers commands

func (*ChainSetHeadCommand) Flags

func (c *ChainSetHeadCommand) Flags() *flagset.Flagset

func (*ChainSetHeadCommand) Help

func (c *ChainSetHeadCommand) Help() string

Help implements the cli.Command interface

func (*ChainSetHeadCommand) MarkDown

func (a *ChainSetHeadCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*ChainSetHeadCommand) Run

func (c *ChainSetHeadCommand) Run(args []string) int

Run implements the cli.Command interface

func (*ChainSetHeadCommand) Synopsis

func (c *ChainSetHeadCommand) Synopsis() string

Synopsis implements the cli.Command interface

type ChainWatchCommand

type ChainWatchCommand struct {
	*Meta2
}

ChainWatchCommand is the command to group the peers commands

func (*ChainWatchCommand) Flags

func (c *ChainWatchCommand) Flags() *flagset.Flagset

func (*ChainWatchCommand) Help

func (c *ChainWatchCommand) Help() string

Help implements the cli.Command interface

func (*ChainWatchCommand) MarkDown

func (c *ChainWatchCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*ChainWatchCommand) Run

func (c *ChainWatchCommand) Run(args []string) int

Run implements the cli.Command interface

func (*ChainWatchCommand) Synopsis

func (c *ChainWatchCommand) Synopsis() string

Synopsis implements the cli.Command interface

type DebugBlockCommand

type DebugBlockCommand struct {
	*Meta2
	// contains filtered or unexported fields
}

DebugBlockCommand is the command to group the peers commands

func (*DebugBlockCommand) Flags

func (c *DebugBlockCommand) Flags() *flagset.Flagset

func (*DebugBlockCommand) Help

func (c *DebugBlockCommand) Help() string

Help implements the cli.Command interface

func (*DebugBlockCommand) MarkDown

func (p *DebugBlockCommand) MarkDown() string

func (*DebugBlockCommand) Run

func (c *DebugBlockCommand) Run(args []string) int

Run implements the cli.Command interface

func (*DebugBlockCommand) Synopsis

func (c *DebugBlockCommand) Synopsis() string

Synopsis implements the cli.Command interface

type DebugCommand

type DebugCommand struct {
	UI cli.Ui
}

DebugCommand is the command to group the peers commands

func (*DebugCommand) Help

func (c *DebugCommand) Help() string

Help implements the cli.Command interface

func (*DebugCommand) MarkDown

func (d *DebugCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*DebugCommand) Run

func (c *DebugCommand) Run(args []string) int

Run implements the cli.Command interface

func (*DebugCommand) Synopsis

func (c *DebugCommand) Synopsis() string

Synopsis implements the cli.Command interface

type DebugPprofCommand

type DebugPprofCommand struct {
	*Meta2
	// contains filtered or unexported fields
}

func (*DebugPprofCommand) Flags

func (d *DebugPprofCommand) Flags() *flagset.Flagset

func (*DebugPprofCommand) Help

func (d *DebugPprofCommand) Help() string

Help implements the cli.Command interface

func (*DebugPprofCommand) MarkDown

func (p *DebugPprofCommand) MarkDown() string

func (*DebugPprofCommand) Run

func (d *DebugPprofCommand) Run(args []string) int

Run implements the cli.Command interface

func (*DebugPprofCommand) Synopsis

func (d *DebugPprofCommand) Synopsis() string

Synopsis implements the cli.Command interface

type DiskDetails

type DiskDetails struct {
	TotalDisk float64 `json:"totalDisk"`
	FreeDisk  float64 `json:"freeDisk"`
	UsedDisk  float64 `json:"usedDisk"`
}

type DumpconfigCommand

type DumpconfigCommand struct {
	*Meta2
}

DumpconfigCommand is for exporting user provided flags into a config file

func (*DumpconfigCommand) Help

func (c *DumpconfigCommand) Help() string

Help implements the cli.Command interface

func (*DumpconfigCommand) MarkDown

func (p *DumpconfigCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*DumpconfigCommand) Run

func (c *DumpconfigCommand) Run(args []string) int

Run implements the cli.Command interface

func (*DumpconfigCommand) Synopsis

func (c *DumpconfigCommand) Synopsis() string

Synopsis implements the cli.Command interface

type FingerprintCommand

type FingerprintCommand struct {
	UI cli.Ui
}

VersionCommand is the command to show the version of the agent

func (*FingerprintCommand) Help

func (c *FingerprintCommand) Help() string

Help implements the cli.Command interface

func (*FingerprintCommand) MarkDown

func (c *FingerprintCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*FingerprintCommand) Run

func (c *FingerprintCommand) Run(args []string) int

Run implements the cli.Command interface

func (*FingerprintCommand) Synopsis

func (c *FingerprintCommand) Synopsis() string

Synopsis implements the cli.Command interface

type MarkDown

type MarkDown interface {
	MarkDown() string
}

type MarkDownCommand

type MarkDownCommand interface {
	MarkDown
	cli.Command
}

type MarkDownCommandFactory

type MarkDownCommandFactory func() (MarkDownCommand, error)

type MemoryDetails

type MemoryDetails struct {
	TotalMem float64 `json:"totalMem"`
	FreeMem  float64 `json:"freeMem"`
	UsedMem  float64 `json:"usedMem"`
}

type Meta

type Meta struct {
	UI cli.Ui
	// contains filtered or unexported fields
}

Meta is a helper utility for the commands

func (*Meta) AskPassword

func (m *Meta) AskPassword() (string, error)

func (*Meta) GetKeystore

func (m *Meta) GetKeystore() (*keystore.KeyStore, error)

func (*Meta) NewFlagSet

func (m *Meta) NewFlagSet(n string) *flagset.Flagset

type Meta2

type Meta2 struct {
	UI cli.Ui
	// contains filtered or unexported fields
}

func (*Meta2) BorConn

func (m *Meta2) BorConn() (proto.BorClient, error)

func (*Meta2) Conn

func (m *Meta2) Conn() (*grpc.ClientConn, error)

func (*Meta2) NewFlagSet

func (m *Meta2) NewFlagSet(n string) *flagset.Flagset

type PeersAddCommand

type PeersAddCommand struct {
	*Meta2
	// contains filtered or unexported fields
}

PeersAddCommand is the command to group the peers commands

func (*PeersAddCommand) Flags

func (p *PeersAddCommand) Flags() *flagset.Flagset

func (*PeersAddCommand) Help

func (p *PeersAddCommand) Help() string

Help implements the cli.Command interface

func (*PeersAddCommand) MarkDown

func (p *PeersAddCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*PeersAddCommand) Run

func (c *PeersAddCommand) Run(args []string) int

Run implements the cli.Command interface

func (*PeersAddCommand) Synopsis

func (c *PeersAddCommand) Synopsis() string

Synopsis implements the cli.Command interface

type PeersCommand

type PeersCommand struct {
	UI cli.Ui
}

PeersCommand is the command to group the peers commands

func (*PeersCommand) Help

func (c *PeersCommand) Help() string

Help implements the cli.Command interface

func (*PeersCommand) MarkDown

func (a *PeersCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*PeersCommand) Run

func (c *PeersCommand) Run(args []string) int

Run implements the cli.Command interface

func (*PeersCommand) Synopsis

func (c *PeersCommand) Synopsis() string

Synopsis implements the cli.Command interface

type PeersListCommand

type PeersListCommand struct {
	*Meta2
}

PeersListCommand is the command to group the peers commands

func (*PeersListCommand) Flags

func (p *PeersListCommand) Flags() *flagset.Flagset

func (*PeersListCommand) Help

func (p *PeersListCommand) Help() string

Help implements the cli.Command interface

func (*PeersListCommand) MarkDown

func (p *PeersListCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*PeersListCommand) Run

func (c *PeersListCommand) Run(args []string) int

Run implements the cli.Command interface

func (*PeersListCommand) Synopsis

func (c *PeersListCommand) Synopsis() string

Synopsis implements the cli.Command interface

type PeersRemoveCommand

type PeersRemoveCommand struct {
	*Meta2
	// contains filtered or unexported fields
}

PeersRemoveCommand is the command to group the peers commands

func (*PeersRemoveCommand) Flags

func (p *PeersRemoveCommand) Flags() *flagset.Flagset

func (*PeersRemoveCommand) Help

func (p *PeersRemoveCommand) Help() string

Help implements the cli.Command interface

func (*PeersRemoveCommand) MarkDown

func (p *PeersRemoveCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*PeersRemoveCommand) Run

func (c *PeersRemoveCommand) Run(args []string) int

Run implements the cli.Command interface

func (*PeersRemoveCommand) Synopsis

func (c *PeersRemoveCommand) Synopsis() string

Synopsis implements the cli.Command interface

type PeersStatusCommand

type PeersStatusCommand struct {
	*Meta2
}

PeersStatusCommand is the command to group the peers commands

func (*PeersStatusCommand) Flags

func (p *PeersStatusCommand) Flags() *flagset.Flagset

func (*PeersStatusCommand) Help

func (p *PeersStatusCommand) Help() string

Help implements the cli.Command interface

func (*PeersStatusCommand) MarkDown

func (p *PeersStatusCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*PeersStatusCommand) Run

func (c *PeersStatusCommand) Run(args []string) int

Run implements the cli.Command interface

func (*PeersStatusCommand) Synopsis

func (c *PeersStatusCommand) Synopsis() string

Synopsis implements the cli.Command interface

type PruneStateCommand

type PruneStateCommand struct {
	*Meta
	// contains filtered or unexported fields
}

func (*PruneStateCommand) Flags

func (c *PruneStateCommand) Flags() *flagset.Flagset

Flags: datadir, datadir.ancient, cache.trie.journal, bloomfilter.size

func (*PruneStateCommand) Help

func (c *PruneStateCommand) Help() string

Help implements the cli.Command interface

func (*PruneStateCommand) MarkDown

func (c *PruneStateCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*PruneStateCommand) Run

func (c *PruneStateCommand) Run(args []string) int

Run implements the cli.Command interface

func (*PruneStateCommand) Synopsis

func (c *PruneStateCommand) Synopsis() string

Synopsis implements the cli.Command interface

type RemoveDBCommand

type RemoveDBCommand struct {
	*Meta2
	// contains filtered or unexported fields
}

RemoveDBCommand is for removing blockchain and state databases

func (*RemoveDBCommand) Flags

func (c *RemoveDBCommand) Flags() *flagset.Flagset

func (*RemoveDBCommand) Help

func (c *RemoveDBCommand) Help() string

Help implements the cli.Command interface

func (*RemoveDBCommand) MarkDown

func (c *RemoveDBCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*RemoveDBCommand) Run

func (c *RemoveDBCommand) Run(args []string) int

Run implements the cli.Command interface

func (*RemoveDBCommand) Synopsis

func (c *RemoveDBCommand) Synopsis() string

Synopsis implements the cli.Command interface

type SnapshotCommand

type SnapshotCommand struct {
	UI cli.Ui
}

SnapshotCommand is the command to group the snapshot commands

func (*SnapshotCommand) Help

func (c *SnapshotCommand) Help() string

Help implements the cli.Command interface

func (*SnapshotCommand) MarkDown

func (a *SnapshotCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*SnapshotCommand) Run

func (c *SnapshotCommand) Run(args []string) int

Run implements the cli.Command interface

func (*SnapshotCommand) Synopsis

func (c *SnapshotCommand) Synopsis() string

Synopsis implements the cli.Command interface

type StatusCommand

type StatusCommand struct {
	*Meta2
	// contains filtered or unexported fields
}

StatusCommand is the command to output the status of the client

func (*StatusCommand) Flags

func (c *StatusCommand) Flags() *flagset.Flagset

func (*StatusCommand) Help

func (p *StatusCommand) Help() string

Help implements the cli.Command interface

func (*StatusCommand) MarkDown

func (p *StatusCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*StatusCommand) Run

func (c *StatusCommand) Run(args []string) int

Run implements the cli.Command interface

func (*StatusCommand) Synopsis

func (c *StatusCommand) Synopsis() string

Synopsis implements the cli.Command interface

type VersionCommand

type VersionCommand struct {
	UI cli.Ui
}

VersionCommand is the command to show the version of the agent

func (*VersionCommand) Help

func (c *VersionCommand) Help() string

Help implements the cli.Command interface

func (*VersionCommand) MarkDown

func (d *VersionCommand) MarkDown() string

MarkDown implements cli.MarkDown interface

func (*VersionCommand) Run

func (c *VersionCommand) Run(args []string) int

Run implements the cli.Command interface

func (*VersionCommand) Synopsis

func (c *VersionCommand) Synopsis() string

Synopsis implements the cli.Command interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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