Documentation ¶
Overview ¶
Package configPkg handles the chifra config command. It The program allows you to manage the various TrueBlocks caches. You may list all of the caches, some of the cache, or even individual caches either in terse or full detail. The cache of interest is specified with the modes option. TrueBlocks maintains caches for the index of address appearances, named addresses, abi files, as well as other data including blockchain data, and address monitors.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResetOptions ¶
func ResetOptions(testMode bool)
func RunConfig ¶
RunConfig handles the config command for the command line. Returns error only as per cobra.
func ServeConfig ¶
func ServeConfig(w http.ResponseWriter, r *http.Request) error
ServeConfig handles the config command for the API. Returns an error.
Types ¶
type ConfigOptions ¶
type ConfigOptions struct { Mode string `json:"mode,omitempty"` // Either show or edit the configuration Paths bool `json:"paths,omitempty"` // Show the configuration paths for the system Globals globals.GlobalOptions `json:"globals,omitempty"` // The global options Conn *rpc.Connection `json:"conn,omitempty"` // The connection to the RPC server BadFlag error `json:"badFlag,omitempty"` // An error flag if needed }
ConfigOptions provides all command options for the chifra config command.
func GetConfigOptions ¶
func GetConfigOptions(args []string, g *globals.GlobalOptions) *ConfigOptions
GetConfigOptions returns the options for this tool so other tools may use it.
func GetOptions ¶
func GetOptions() *ConfigOptions
func (*ConfigOptions) ConfigInternal ¶
func (opts *ConfigOptions) ConfigInternal() error
ConfigInternal handles the internal workings of the config command. Returns an error.
func (*ConfigOptions) HandleEdit ¶
func (opts *ConfigOptions) HandleEdit() error
func (*ConfigOptions) HandlePaths ¶
func (opts *ConfigOptions) HandlePaths() error
HandlePaths handles the paths command for the command line. Returns error only as per cobra.
func (*ConfigOptions) HandleShow ¶
func (opts *ConfigOptions) HandleShow() error
func (*ConfigOptions) String ¶
func (opts *ConfigOptions) String() string
String implements the Stringer interface