Documentation ¶
Index ¶
- type Chainpoint_DB
- func (chp *Chainpoint_DB) BulkInsertAggState(aggStates []types.AggState) error
- func (chp *Chainpoint_DB) BulkInsertBtcAggState(aggStates []types.AnchorBtcAggState) error
- func (chp *Chainpoint_DB) BulkInsertBtcTxState(txStates []types.AnchorBtcTxState) error
- func (chp *Chainpoint_DB) BulkInsertCalState(calStates []types.CalStateObject) error
- func (chp *Chainpoint_DB) BulkInsertProofs(proofs []types.ProofState) error
- func (chp *Chainpoint_DB) GetAggStateObjectsByProofIds(proofIds []string) ([]types.AggState, error)
- func (chp *Chainpoint_DB) GetAnchorBTCAggStateObjectsByCalIds(calIds []string) ([]types.AnchorBtcAggState, error)
- func (chp *Chainpoint_DB) GetBTCTxStateObjectByAnchorBTCAggId(aggId string) (types.AnchorBtcTxState, error)
- func (chp *Chainpoint_DB) GetBTCTxStateObjectByBtcHeadState(btctx string) (types.AnchorBtcTxState, error)
- func (chp *Chainpoint_DB) GetCalStateObjectsByAggIds(aggIds []string) ([]types.CalStateObject, error)
- func (chp *Chainpoint_DB) GetProofIdsByAggIds(aggIds []string) ([]string, error)
- func (chp *Chainpoint_DB) GetProofIdsByBtcTxId(btcTxId string) ([]string, error)
- func (chp *Chainpoint_DB) GetProofsByProofIds(proofIds []string) (map[string]types.ProofState, error)
- func (chp *Chainpoint_DB) PruneOldState()
- type KVStore
- func (cache *KVStore) Append(key string, value string) error
- func (cache *KVStore) Del(key string, value string) error
- func (cache *KVStore) Get(key string) (string, error)
- func (cache *KVStore) GetArray(key string) ([]string, error)
- func (cache *KVStore) Set(key string, value string) error
- func (cache *KVStore) SetArray(key string, values []string) error
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()