block

package
v0.0.0-...-805313b Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrBlockHeightNotFound = errors.New("block height not found")

Functions

This section is empty.

Types

type Repository

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

func NewBlockRepository

func NewBlockRepository(dbAdapter sqlite.Database) *Repository

func (*Repository) CreateOrUpdateBlockHeight

func (r *Repository) CreateOrUpdateBlockHeight(height int) error

CreateOrUpdateBlockHeight creates a new BlockHeight if it doesn't exist, or updates the existing record.

func (*Repository) DeleteBlockHeight

func (r *Repository) DeleteBlockHeight() error

DeleteBlockHeight deletes the existing BlockHeight record if it exists.

func (*Repository) GetBlockHeight

func (r *Repository) GetBlockHeight() (*entities.BlockHeight, error)

GetBlockHeight retrieves the current BlockHeight record if it exists.

Jump to

Keyboard shortcuts

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