Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ConfigDir is the directory to store config file ConfigDir string // DefaultConfigFile is the default config file name DefaultConfigFile string )
Directories
View Source
var ( // ErrConfigNotMatch indicates error for no config matches ErrConfigNotMatch = fmt.Errorf("no matching config") // ErrEmptyEndpoint indicates error for empty endpoint ErrEmptyEndpoint = fmt.Errorf("no endpoint has been set") // ErrConfigDefaultAccountNotSet indicates an error for the default account not being set ErrConfigDefaultAccountNotSet = fmt.Errorf("default account not set") )
Error strings
View Source
var ( // ReadConfig represents the current config read from local ReadConfig Config // Insecure represents the insecure connect option of grpc dial, default is false Insecure = false // UILanguage represents the language of ioctl user interface, default is 0 representing English UILanguage Language )
View Source
var ConfigCmd = &cobra.Command{
Use: "config",
Short: "Get, set, or reset configuration for ioctl",
}
ConfigCmd represents the config command
Functions ¶
func GetAddressOrAlias ¶
GetAddressOrAlias gets address from args or context
func GetContextAddressOrAlias ¶
GetContextAddressOrAlias gets current context
Types ¶
type Config ¶
type Config struct {
Wallet string `json:"wallet" yaml:"wallet"`
Endpoint string `json:"endpoint" yaml:"endpoint"`
SecureConnect bool `json:"secureConnect" yaml:"secureConnect"`
Aliases map[string]string `json:"aliases" yaml:"aliases"`
DefaultAccount Context `json:"defaultAccount" yaml:"defaultAccount"`
Explorer string `json:"explorer" yaml:"explorer"`
Language string `json:"language" yaml:"language"`
Nsv2height uint64 `json:"nsv2height" yaml:"nsv2height"`
AnalyserEndpoint string `json:"analyserEndpoint" yaml:"analyserEndpoint"`
// WsEndpoint w3bstream endpoint
WsEndpoint string `json:"wsEndpoint" yaml:"wsEndpoint"`
// IPFSEndpoint ipfs endpoint for uploading
IPFSEndpoint string `json:"ipfsEndpoint" yaml:"ipfsEndpoint"`
// IPFSGateway ipfs gateway for resource fetching (with scheme)
IPFSGateway string `json:"ipfsGateway" yaml:"ipfsGateway"`
// WsProjectRegisterContract w3bstream project register contract address
WsProjectRegisterContract string `json:"wsProjectRegisterContract" yaml:"wsProjectRegisterContract"`
// WsProjectStoreContract w3bstream project store contract address
WsProjectStoreContract string `json:"wsProjectStoreContract" yaml:"wsProjectStoreContract"`
// WsFleetManagementContract w3bstream fleet management contract address
WsFleetManagementContract string `json:"wsFleetManagementContract" yaml:"wsFleetManagementContract"`
// WsProverStoreContract w3bstream Prover store contract address
WsProverStoreContract string `json:"wsProverStoreContract" yaml:"wsProverStoreContract"`
// WsProjectDevicesContract w3bstream Project devices contract address
WsProjectDevicesContract string `json:"wsProjectDevicesContract" yaml:"wsProjectDevicesContract"`
// WsRouterContract w3bstream Router contract address
WsRouterContract string `json:"wsRouterContract" yaml:"wsRouterContract"`
// WsVmTypeContract w3bstream VMType contract address
WsVmTypeContract string `json:"wsVmTypeContract" yaml:"wsVmTypeContract"`
}
Config defines the config schema
Click to show internal directories.
Click to hide internal directories.