postgres

package
v0.0.0-...-2749a05 Latest Latest
Warning

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

Go to latest
Published: Apr 5, 2022 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type BlockRepository

type BlockRepository struct {
	DB *sql.DB
}

func NewBlockRepository

func NewBlockRepository(db *sql.DB) *BlockRepository

func (*BlockRepository) GetBlockByHash

func (db *BlockRepository) GetBlockByHash(ctx context.Context, hash string) (repository.Block, error)

func (*BlockRepository) GetBlockByID

func (db *BlockRepository) GetBlockByID(ctx context.Context, number int64) (repository.Block, error)

func (*BlockRepository) InsertFullBlockInfo

func (db *BlockRepository) InsertFullBlockInfo(ctx context.Context, blk repository.Block, txList []repository.Tx) error

type SummaryRepository

type SummaryRepository struct {
	DB *sql.DB
}

func NewSummaryRepository

func NewSummaryRepository(db *sql.DB) *SummaryRepository

func (*SummaryRepository) GetMaxBlockNum

func (db *SummaryRepository) GetMaxBlockNum(ctx context.Context) int64

type TxRepository

type TxRepository struct {
	DB *sql.DB
}

func NewTxRepository

func NewTxRepository(db *sql.DB) *TxRepository

func (*TxRepository) GetTXByHash

func (db *TxRepository) GetTXByHash(ctx context.Context, hash string) (repository.Tx, error)

func (*TxRepository) GetTXsByBlockNum

func (db *TxRepository) GetTXsByBlockNum(ctx context.Context, id int64) ([]repository.Tx, error)

Jump to

Keyboard shortcuts

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