Documentation ¶
Index ¶
- type BlockRepository
- func (db *BlockRepository) GetBlockByHash(ctx context.Context, hash string) (repository.Block, error)
- func (db *BlockRepository) GetBlockByID(ctx context.Context, number int64) (repository.Block, error)
- func (db *BlockRepository) InsertFullBlockInfo(ctx context.Context, blk repository.Block, txList []repository.Tx) error
- type SummaryRepository
- type TxRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BlockRepository ¶
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 ¶
func NewSummaryRepository ¶
func NewSummaryRepository(db *sql.DB) *SummaryRepository
func (*SummaryRepository) GetMaxBlockNum ¶
func (db *SummaryRepository) GetMaxBlockNum(ctx context.Context) int64
type TxRepository ¶
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)
Click to show internal directories.
Click to hide internal directories.