Documentation ¶
Overview ¶
configPkg implements the chifra config command.
The chifra config 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 ¶
- func ResetOptions(testMode bool)
- func RunConfig(cmd *cobra.Command, args []string) error
- func ServeConfig(w http.ResponseWriter, r *http.Request) error
- type ConfigOptions
- func (opts *ConfigOptions) ConfigInternal(rCtx *output.RenderCtx) error
- func (opts *ConfigOptions) HandleDump(rCtx *output.RenderCtx) error
- func (opts *ConfigOptions) HandleEdit(rCtx *output.RenderCtx) error
- func (opts *ConfigOptions) HandlePaths(rCtx *output.RenderCtx) error
- func (opts *ConfigOptions) HandleShow(rCtx *output.RenderCtx) error
- func (opts *ConfigOptions) String() string
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 Dump bool `json:"dump,omitempty"` // Dump the configuration to stdout 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 ConfigFinishParseInternal ¶
func ConfigFinishParseInternal(w io.Writer, values url.Values) *ConfigOptions
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(rCtx *output.RenderCtx) error
ConfigInternal handles the internal workings of the config command. Returns an error.
func (*ConfigOptions) HandleDump ¶
func (opts *ConfigOptions) HandleDump(rCtx *output.RenderCtx) error
HandleDump dumps a config to the screen
func (*ConfigOptions) HandleEdit ¶
func (opts *ConfigOptions) HandleEdit(rCtx *output.RenderCtx) error
func (*ConfigOptions) HandlePaths ¶
func (opts *ConfigOptions) HandlePaths(rCtx *output.RenderCtx) error
HandlePaths handles the paths command for the command line. Returns error only as per cobra.
func (*ConfigOptions) HandleShow ¶
func (opts *ConfigOptions) HandleShow(rCtx *output.RenderCtx) error
func (*ConfigOptions) String ¶
func (opts *ConfigOptions) String() string
String implements the Stringer interface