level

package
v0.0.0 Latest Latest
Warning

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

Go to latest
Published: Mar 10, 2022 License: AGPL-3.0 Imports: 10 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Chainpoint_DB

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

func NewDB

func NewDB(db *KVStore) *Chainpoint_DB

func (*Chainpoint_DB) BulkInsertAggState

func (chp *Chainpoint_DB) BulkInsertAggState(aggStates []types.AggState) error

BulkInsertAggState : inserts aggregator state into postgres

func (*Chainpoint_DB) BulkInsertBtcAggState

func (chp *Chainpoint_DB) BulkInsertBtcAggState(aggStates []types.AnchorBtcAggState) error

BulkInsertBtcAggState : inserts aggregator state into postgres

func (*Chainpoint_DB) BulkInsertBtcTxState

func (chp *Chainpoint_DB) BulkInsertBtcTxState(txStates []types.AnchorBtcTxState) error

BulkInsertBtcTxState : inserts aggregator state into postgres

func (*Chainpoint_DB) BulkInsertCalState

func (chp *Chainpoint_DB) BulkInsertCalState(calStates []types.CalStateObject) error

BulkInsertCalState : inserts aggregator state into postgres

func (*Chainpoint_DB) BulkInsertProofs

func (chp *Chainpoint_DB) BulkInsertProofs(proofs []types.ProofState) error

BulkInsertProofs : Use pg driver and loop to create bulk proof insert statement

func (*Chainpoint_DB) GetAggStateObjectsByProofIds

func (chp *Chainpoint_DB) GetAggStateObjectsByProofIds(proofIds []string) ([]types.AggState, error)

GetAggStateObjectsByProofIds : GetArray aggstate objects, given an array of proofIds

func (*Chainpoint_DB) GetAnchorBTCAggStateObjectsByCalIds

func (chp *Chainpoint_DB) GetAnchorBTCAggStateObjectsByCalIds(calIds []string) ([]types.AnchorBtcAggState, error)

GetAnchorBTCAggStateObjectsByCalIds: GetArray anchor state objects, given an array of calIds

func (*Chainpoint_DB) GetBTCTxStateObjectByAnchorBTCAggId

func (chp *Chainpoint_DB) GetBTCTxStateObjectByAnchorBTCAggId(aggId string) (types.AnchorBtcTxState, error)

GetBTCTxStateObjectByAnchorBTCAggId: GetArray btc state objects, given an array of agg ids

func (*Chainpoint_DB) GetBTCTxStateObjectByBtcHeadState

func (chp *Chainpoint_DB) GetBTCTxStateObjectByBtcHeadState(btctx string) (types.AnchorBtcTxState, error)

GetBTCTxStateObjectByAnchorBTCHeadState GetArray btc state objects, given an array of agg ids

func (*Chainpoint_DB) GetCalStateObjectsByAggIds

func (chp *Chainpoint_DB) GetCalStateObjectsByAggIds(aggIds []string) ([]types.CalStateObject, error)

GetCalStateObjectsByProofIds : GetArray calstate objects, given an array of aggIds

func (*Chainpoint_DB) GetProofIdsByAggIds

func (chp *Chainpoint_DB) GetProofIdsByAggIds(aggIds []string) ([]string, error)

GetProofIdsByAggIds : get proof ids from agg table, based on aggId

func (*Chainpoint_DB) GetProofIdsByBtcTxId

func (chp *Chainpoint_DB) GetProofIdsByBtcTxId(btcTxId string) ([]string, error)

GetProofIdsByBtcTxId : get proof ids from proof table, based on btctxId

func (*Chainpoint_DB) GetProofsByProofIds

func (chp *Chainpoint_DB) GetProofsByProofIds(proofIds []string) (map[string]types.ProofState, error)

GetProofsByProofIds : get proofs from proof table, based on id

func (*Chainpoint_DB) PruneOldState

func (chp *Chainpoint_DB) PruneOldState()

type KVStore

type KVStore struct {
	RedisClient *redis.Client
	LevelDb     dbm.DB
	Logger      log.Logger
}

func NewKVStore

func NewKVStore(db *dbm.DB, logger log.Logger) *KVStore

func (*KVStore) Append

func (cache *KVStore) Append(key string, value string) error

func (*KVStore) Del

func (cache *KVStore) Del(key string, value string) error

func (*KVStore) Get

func (cache *KVStore) Get(key string) (string, error)

func (*KVStore) GetArray

func (cache *KVStore) GetArray(key string) ([]string, error)

func (*KVStore) Set

func (cache *KVStore) Set(key string, value string) error

func (*KVStore) SetArray

func (cache *KVStore) SetArray(key string, values []string) error

Jump to

Keyboard shortcuts

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