ioctl

package
v1.7.0-rc1 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2022 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type APIServiceConfig

type APIServiceConfig struct {
	Endpoint string
	Insecure bool
}

APIServiceConfig defines a config of APIServiceClient

type Client

type Client interface {
	// Start starts the client
	Start(context.Context) error
	// Stop stops the client
	Stop(context.Context) error
	// Config returns the config of the client
	Config() config.Config
	// APIServiceClient returns an API service client
	APIServiceClient(APIServiceConfig) (iotexapi.APIServiceClient, error)
	// SelectTranslation select a translation based on UILanguage
	SelectTranslation(map[config.Language]string) (string, config.Language)
	// AskToConfirm asks user to confirm from terminal, true to continue
	AskToConfirm(string) bool
	// ReadSecret reads password from terminal
	ReadSecret() (string, error)
	// Execute a bash command
	Execute(string) error
	// doing
	GetAddress(in string) (string, error)
	// doing
	Address(in string) (string, error)
	// doing
	NewKeyStore(string, int, int) *keystore.KeyStore
	// doing
	GetAliasMap() map[string]string
	// doing
	WriteConfig(config.Config) error
	// PrintError print the error message
	PrintError(error)
	// PrintInfo print the command result or the question query
	PrintInfo(string)
	// SetCryptoSm2 set the flag of sm2 cryptographic algorithm
	SetCryptoSm2(bool)
	// HasCryptoSm2 get the flag of sm2 cryptographic algorithm
	HasCryptoSm2() bool
}

Client defines the interface of an ioctl client

func NewClient

func NewClient() Client

NewClient creates a new ioctl client

Jump to

Keyboard shortcuts

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