Documentation ¶
Overview ¶
explorePkg implements the chifra explore command.
chifra explore opens Etherscan (and other explorers -- including our own) to the block identifier, transaction identifier, or address you specify. It's a handy (configurable) way to open an explorer from the command line, nothing more.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ResetOptions ¶
func ResetOptions(testMode bool)
func RunExplore ¶
RunExplore handles the explore command for the command line. Returns error only as per cobra.
func ServeExplore ¶
func ServeExplore(w http.ResponseWriter, r *http.Request) error
ServeExplore handles the explore command for the API. Returns an error.
Types ¶
type ExploreOptions ¶
type ExploreOptions struct { Terms []string `json:"terms,omitempty"` // One or more address, name, block, or transaction identifier Local bool `json:"local,omitempty"` // Open the local TrueBlocks explorer Google bool `json:"google,omitempty"` // Search google excluding popular blockchain explorers Dalle bool `json:"dalle,omitempty"` // Open the address to the DalleDress explorer 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 }
ExploreOptions provides all command options for the chifra explore command.
func ExploreFinishParseInternal ¶
func ExploreFinishParseInternal(w io.Writer, values url.Values) *ExploreOptions
func GetExploreOptions ¶
func GetExploreOptions(args []string, g *globals.GlobalOptions) *ExploreOptions
GetExploreOptions returns the options for this tool so other tools may use it.
func GetOptions ¶
func GetOptions() *ExploreOptions
func (*ExploreOptions) ExploreInternal ¶
func (opts *ExploreOptions) ExploreInternal(rCtx *output.RenderCtx) error
ExploreInternal handles the internal workings of the explore command. Returns an error.
func (*ExploreOptions) HandleShow ¶
func (opts *ExploreOptions) HandleShow(rCtx *output.RenderCtx) error
func (*ExploreOptions) String ¶
func (opts *ExploreOptions) String() string
String implements the Stringer interface
type ExploreType ¶
type ExploreType uint8
const ( ExploreNone ExploreType = iota ExploreAddress ExploreName ExploreEnsName ExploreTx ExploreBlock ExploreFourByte )
func (ExploreType) String ¶
func (t ExploreType) String() string
type ExploreUrl ¶
type ExploreUrl struct {
// contains filtered or unexported fields
}