data

package
v0.3.4-rc.5 Latest Latest
Warning

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

Go to latest
Published: Dec 4, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type SortOrder

type SortOrder string
const (
	ASC  SortOrder = "ASC"
	DESC SortOrder = "DESC"
)

type State

type State struct {
	ID        string    `db:"id" structs:"-"`
	Root      string    `db:"root" structs:"root"`
	TxHash    string    `db:"tx_hash" structs:"tx_hash"`
	Block     uint64    `db:"block" structs:"block"`
	CreatedAt time.Time `db:"created_at" structs:"created_at"`
}

type StateQ

type StateQ interface {
	New() StateQ

	Get() (*State, error)
	Upsert(data State) error

	FilterByRoot(root ...string) StateQ
	FilterByBlock(block ...uint64) StateQ

	SortByBlockHeight(order SortOrder) StateQ
}

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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