common

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 9, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AccountsModule  = "account"
	ContractsModule = "contract"
	GasModule       = "gastracker"
	LogsModule      = "logs"
	ProxyModule     = "proxy"
	StatsModule     = "stats"
	TokenModule     = "token"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockParameter

type BlockParameter int32

BlockParameter is an enumeration of allowed block parameters. ENUM(latest,earliest,pending)

const (
	// BlockParameterLatest is a BlockParameter of type Latest.
	BlockParameterLatest BlockParameter = iota
	// BlockParameterEarliest is a BlockParameter of type Earliest.
	BlockParameterEarliest
	// BlockParameterPending is a BlockParameter of type Pending.
	BlockParameterPending
)

func ParseBlockParameter

func ParseBlockParameter(name string) (BlockParameter, error)

ParseBlockParameter attempts to convert a string to a BlockParameter

func (BlockParameter) String

func (x BlockParameter) String() string

String implements the Stringer interface.

type DateRange

type DateRange struct {
	StartDate time.Time `etherscan:"startdate,date"`
	EndDate   time.Time `etherscan:"enddate,date"`
	Sort      SortingPreference
}

DateRange contains request parameters for requests that span a set of dates.

type SortingPreference

type SortingPreference int32

SortingPreference is an enumeration of sorting preferences. ENUM(asc,desc)

const (
	// SortingPreferenceAsc is a SortingPreference of type Asc.
	SortingPreferenceAsc SortingPreference = iota
	// SortingPreferenceDesc is a SortingPreference of type Desc.
	SortingPreferenceDesc
)

func ParseSortingPreference

func ParseSortingPreference(name string) (SortingPreference, error)

ParseSortingPreference attempts to convert a string to a SortingPreference

func (SortingPreference) String

func (x SortingPreference) String() string

String implements the Stringer interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL