public_nodes

package
v1.1.4 Latest Latest
Warning

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

Go to latest
Published: Jun 1, 2022 License: AGPL-3.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewTransformer

func NewTransformer() interfaces.Transformer

NewTransformer satisfies interfaces.TransformerConstructor for public.nodes

Types

type CSVWriter added in v1.1.0

type CSVWriter struct {
	// contains filtered or unexported fields
}

CSVWriter struct for writing v3 DB public.nodes models to a csv file

func NewWriter added in v1.1.0

func NewWriter(dst io.WriteCloser) *CSVWriter

NewWriter satisfies interfaces.WriterConstructor for public.nodes

func (*CSVWriter) Close added in v1.1.0

func (cw *CSVWriter) Close() error

Close satisfies io.Closer

func (*CSVWriter) Write added in v1.1.0

func (cw *CSVWriter) Write(pgStr csv.WriteCSVStr, models interface{}) error

Write satisfies cshModel.Writer for v3 database for nModel

type NodeModel

type NodeModel struct {
	GenesisBlock string `db:"genesis_block"`
	NetworkID    string `db:"network_id"`
	NodeID       string `db:"node_id"`
	ClientName   string `db:"client_name"`
	ChainID      int    `db:"chain_id"`
}

NodeModel is the v2 and v3 model for public.nodes

type Transformer

type Transformer struct {
}

Transformer for transforming v2 DB public.nodes models to v3 DB models

func (*Transformer) Transform

func (t *Transformer) Transform(models interface{}, expectedRange [2]uint64) (interface{}, [][2]uint64, error)

Transform satisfies interfaces.Transformer for public.nodes

Jump to

Keyboard shortcuts

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