Documentation ¶
Index ¶
Constants ¶
View Source
const (
LevelTrace slog.Level = slog.LevelDebug - 4
)
Variables ¶
This section is empty.
Functions ¶
func InitializeConfig ¶
func InitializeConfig(cmd *cobra.Command, config *BaseConfiguration) error
Types ¶
type AddVarCmdConfig ¶
type AddVarCmdConfig struct { OrchestrationConfig *OrchestrationConfig PartitionID uint32 ShardID BytesHex VarFilePath string }
type BaseConfiguration ¶
type BaseConfiguration struct { // The Alphabill home directory HomeDir string // Configuration file URL. If it's relative, then it's relative from the HomeDir. CfgFile string ConsoleWriter ConsoleWrapper Logger *slog.Logger }
func (*BaseConfiguration) AddConfigurationFlags ¶
func (c *BaseConfiguration) AddConfigurationFlags(cmd *cobra.Command)
func (*BaseConfiguration) ConfigFileExists ¶
func (c *BaseConfiguration) ConfigFileExists() bool
func (*BaseConfiguration) InitConfigFileLocation ¶
func (c *BaseConfiguration) InitConfigFileLocation()
func (*BaseConfiguration) InitializeConfig ¶
func (c *BaseConfiguration) InitializeConfig(cmd *cobra.Command) error
InitializeConfig reads in config file and ENV variables if set.
type BillsConfig ¶
type BillsConfig struct { WalletConfig *WalletConfig RpcUrl string Key uint64 ShowUnswapped bool BillID BytesHex PartitionID uint32 }
func (*BillsConfig) GetRpcUrl ¶ added in v0.4.0
func (c *BillsConfig) GetRpcUrl() string
type BytesHex ¶
type BytesHex []byte
BytesHex cobra cli hex value flag that accepts any hex string with or without 0x prefix, implements github.com/spf13/pflag/flag.go#Value interface
type ConsoleWrapper ¶
func NewStdoutWriter ¶
func NewStdoutWriter() ConsoleWrapper
type EvmConfig ¶
type EvmConfig struct { WalletConfig *WalletConfig NodeURL string }
type LogConfiguration ¶
type LogConfiguration struct { Level string Format string OutputPath string TimeFormat string NoColor bool }
func (*LogConfiguration) LogLevel ¶
func (cfg *LogConfiguration) LogLevel() slog.Level
type OrchestrationConfig ¶
type OrchestrationConfig struct { WalletConfig *WalletConfig RpcUrl string Key uint64 }
type PartitionType ¶
type PartitionType string
PartitionType "partition" cli flag, implements github.com/spf13/pflag/flag.go#Value interface
const ( MoneyType PartitionType = "money" TokensType PartitionType = "tokens" EnterpriseTokensType PartitionType = "enterprise-tokens" EvmType PartitionType = "evm" )
func (*PartitionType) Set ¶
func (e *PartitionType) Set(v string) error
Set sets the value of this partitionType string
func (*PartitionType) String ¶
func (e *PartitionType) String() string
String returns string value of given partitionType, used in Printf and help context
func (*PartitionType) Type ¶
func (e *PartitionType) Type() string
Type used to show the type value in the help context
type StdoutWrapper ¶
type StdoutWrapper struct { }
func (*StdoutWrapper) Print ¶
func (w *StdoutWrapper) Print(a ...any)
func (*StdoutWrapper) Println ¶
func (w *StdoutWrapper) Println(a ...any)
type WalletConfig ¶
type WalletConfig struct { Base *BaseConfiguration WalletHomeDir string PasswordFromArg string PromptPassword bool }
Click to show internal directories.
Click to hide internal directories.