Documentation ¶
Index ¶
- Variables
- func Block_Identifier_To_Block(identifier BlockIdentifier, network Network) (int, error)
- func Default_rpc(network Network) (string, error)
- func Etherscan_base_url(network Network) (string, error)
- func FilterEventsByContractAddress(providername string, contractAddress string, FromBlockNumber uint64, ...)
- func FilterEventsByHexKeyString(providername string, hexKeyString []string, FromBlockNumber uint64, ...)
- func GetFileExportersForBackfill(backfillType BackfillDataType, kwargs map[string]interface{}) (map[string]*FileResourceExporter, error)
- func Get_current_block_number(network Network) (int, error)
- type AbstractResourceExporter
- type BackfillDataType
- type BlockIdentifier
- type ExportMode
- type FileResourceExporter
- type GraceFullkiller
- type Network
Constants ¶
This section is empty.
Variables ¶
View Source
var BackfillError = errors.New("backfill error")
BackfillError is a custom error type for backfill-related errors.
Functions ¶
func Block_Identifier_To_Block ¶
func Block_Identifier_To_Block(identifier BlockIdentifier, network Network) (int, error)
func Default_rpc ¶
func Etherscan_base_url ¶
func GetFileExportersForBackfill ¶
func GetFileExportersForBackfill(backfillType BackfillDataType, kwargs map[string]interface{}) (map[string]*FileResourceExporter, error)
Backfill logic
Types ¶
type AbstractResourceExporter ¶
type AbstractResourceExporter struct {
// contains filtered or unexported fields
}
AbstractResourceExporter is the base class for resource exporters.
func (*AbstractResourceExporter) Close ¶
func (e *AbstractResourceExporter) Close()
func (*AbstractResourceExporter) EncodeDataclassAsDict ¶
func (e *AbstractResourceExporter) EncodeDataclassAsDict(dataclass map[string]interface{}) map[string]interface{}
func (*AbstractResourceExporter) Init ¶
func (e *AbstractResourceExporter) Init()
use pointer as allow the actual value modification
type BackfillDataType ¶
type BackfillDataType string
BackfillDataType represents different types of blockchain data that can be backfilled.
const ( FullBlocks BackfillDataType = "full_blocks" Blocks BackfillDataType = "blocks" Transactions BackfillDataType = "transactions" Transfers BackfillDataType = "transfers" Events BackfillDataType = "events" Traces BackfillDataType = "traces" )
type BlockIdentifier ¶
type BlockIdentifier string
type ExportMode ¶
type ExportMode string
ExportMode defines the mode of export: db_models or csv.
const ( DBModels ExportMode = "db_models" CSV ExportMode = "csv" )
type FileResourceExporter ¶
type FileResourceExporter struct { AbstractResourceExporter // contains filtered or unexported fields }
FileResourceExporter is used to export resources to a CSV file.
func NewFileResourceExporter ¶
func NewFileResourceExporter(fileName string, append bool) (*FileResourceExporter, error)
func (*FileResourceExporter) CSVEncodeValue ¶
func (e *FileResourceExporter) CSVEncodeValue(val interface{}) (string, error)
func (*FileResourceExporter) EncodeDataclass ¶
func (e *FileResourceExporter) EncodeDataclass(dataclass map[string]interface{}) ([]string, string, error)
func (*FileResourceExporter) Write ¶
func (e *FileResourceExporter) Write(resources []map[string]interface{}) error
type GraceFullkiller ¶
type GraceFullkiller struct {
// contains filtered or unexported fields
}
func New_Gracfull_Killer ¶
func New_Gracfull_Killer() *GraceFullkiller
func (*GraceFullkiller) KillNow ¶
func (g *GraceFullkiller) KillNow() bool
Click to show internal directories.
Click to hide internal directories.