Documentation ¶
Index ¶
- Variables
- type Repository
- func (r *Repository) BeginRunesTx(ctx context.Context) (datagateway.RunesDataGatewayWithTx, error)
- func (r *Repository) Commit(ctx context.Context) error
- func (r *Repository) CountRuneEntries(ctx context.Context) (uint64, error)
- func (r *Repository) CreateIndexedBlock(ctx context.Context, block *entity.IndexedBlock) error
- func (r *Repository) CreateOutPointBalances(ctx context.Context, outPointBalances []*entity.OutPointBalance) error
- func (r *Repository) CreateRuneBalances(ctx context.Context, params []datagateway.CreateRuneBalancesParams) error
- func (r *Repository) CreateRuneEntries(ctx context.Context, entries []*runes.RuneEntry, blockHeight uint64) error
- func (r *Repository) CreateRuneEntryStates(ctx context.Context, entries []*runes.RuneEntry, blockHeight uint64) error
- func (r *Repository) CreateRuneTransactions(ctx context.Context, txs []*entity.RuneTransaction) error
- func (r *Repository) DeleteIndexedBlockSinceHeight(ctx context.Context, height uint64) error
- func (r *Repository) DeleteOutPointBalancesSinceHeight(ctx context.Context, height uint64) error
- func (r *Repository) DeleteRuneBalancesSinceHeight(ctx context.Context, height uint64) error
- func (r *Repository) DeleteRuneEntriesSinceHeight(ctx context.Context, height uint64) error
- func (r *Repository) DeleteRuneEntryStatesSinceHeight(ctx context.Context, height uint64) error
- func (r *Repository) DeleteRuneTransactionsSinceHeight(ctx context.Context, height uint64) error
- func (r *Repository) DeleteRunestonesSinceHeight(ctx context.Context, height uint64) error
- func (r *Repository) GetBalanceByPkScriptAndRuneId(ctx context.Context, pkScript []byte, runeId runes.RuneId, blockHeight uint64) (*entity.Balance, error)
- func (r *Repository) GetBalancesByPkScript(ctx context.Context, pkScript []byte, blockHeight uint64, limit int32, ...) ([]*entity.Balance, error)
- func (r *Repository) GetBalancesByRuneId(ctx context.Context, runeId runes.RuneId, blockHeight uint64, limit int32, ...) ([]*entity.Balance, error)
- func (r *Repository) GetIndexedBlockByHeight(ctx context.Context, height int64) (*entity.IndexedBlock, error)
- func (r *Repository) GetLatestBlock(ctx context.Context) (types.BlockHeader, error)
- func (r *Repository) GetLatestIndexerState(ctx context.Context) (entity.IndexerState, error)
- func (r *Repository) GetLatestIndexerStats(ctx context.Context) (string, common.Network, error)
- func (r *Repository) GetOngoingRuneEntries(ctx context.Context, search string, blockHeight uint64, limit int32, ...) ([]*runes.RuneEntry, error)
- func (r *Repository) GetRuneEntries(ctx context.Context, search string, blockHeight uint64, limit int32, ...) ([]*runes.RuneEntry, error)
- func (r *Repository) GetRuneEntryByRuneId(ctx context.Context, runeId runes.RuneId) (*runes.RuneEntry, error)
- func (r *Repository) GetRuneEntryByRuneIdAndHeight(ctx context.Context, runeId runes.RuneId, blockHeight uint64) (*runes.RuneEntry, error)
- func (r *Repository) GetRuneEntryByRuneIdAndHeightBatch(ctx context.Context, runeIds []runes.RuneId, blockHeight uint64) (map[runes.RuneId]*runes.RuneEntry, error)
- func (r *Repository) GetRuneEntryByRuneIdBatch(ctx context.Context, runeIds []runes.RuneId) (map[runes.RuneId]*runes.RuneEntry, error)
- func (r *Repository) GetRuneIdFromRune(ctx context.Context, rune runes.Rune) (runes.RuneId, error)
- func (r *Repository) GetRuneTransaction(ctx context.Context, txHash chainhash.Hash) (*entity.RuneTransaction, error)
- func (r *Repository) GetRuneTransactions(ctx context.Context, pkScript []byte, runeId runes.RuneId, ...) ([]*entity.RuneTransaction, error)
- func (r *Repository) GetRunesBalancesAtOutPoint(ctx context.Context, outPoint wire.OutPoint) (map[runes.RuneId]*entity.OutPointBalance, error)
- func (r *Repository) GetRunesUTXOsByPkScript(ctx context.Context, pkScript []byte, blockHeight uint64, limit int32, ...) ([]*entity.RunesUTXO, error)
- func (r *Repository) GetRunesUTXOsByRuneIdAndPkScript(ctx context.Context, runeId runes.RuneId, pkScript []byte, blockHeight uint64, ...) ([]*entity.RunesUTXO, error)
- func (r *Repository) GetTotalHoldersByRuneIds(ctx context.Context, runeIds []runes.RuneId, blockHeight uint64) (map[runes.RuneId]int64, error)
- func (r *Repository) Rollback(ctx context.Context) error
- func (r *Repository) SetIndexerState(ctx context.Context, state entity.IndexerState) error
- func (r *Repository) SpendOutPointBalancesBatch(ctx context.Context, outPoints []wire.OutPoint, blockHeight uint64) error
- func (r *Repository) UnspendOutPointBalancesSinceHeight(ctx context.Context, height uint64) error
- func (r *Repository) UpdateIndexerStats(ctx context.Context, clientVersion string, network common.Network) error
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrTxAlreadyExists = errors.New("Transaction already exists. Call Commit() or Rollback() first.")
Functions ¶
This section is empty.
Types ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
func NewRepository ¶
func NewRepository(db postgres.DB) *Repository
func (*Repository) BeginRunesTx ¶
func (r *Repository) BeginRunesTx(ctx context.Context) (datagateway.RunesDataGatewayWithTx, error)
func (*Repository) CountRuneEntries ¶
func (r *Repository) CountRuneEntries(ctx context.Context) (uint64, error)
func (*Repository) CreateIndexedBlock ¶
func (r *Repository) CreateIndexedBlock(ctx context.Context, block *entity.IndexedBlock) error
func (*Repository) CreateOutPointBalances ¶
func (r *Repository) CreateOutPointBalances(ctx context.Context, outPointBalances []*entity.OutPointBalance) error
func (*Repository) CreateRuneBalances ¶
func (r *Repository) CreateRuneBalances(ctx context.Context, params []datagateway.CreateRuneBalancesParams) error
func (*Repository) CreateRuneEntries ¶ added in v0.5.5
func (*Repository) CreateRuneEntryStates ¶ added in v0.5.5
func (*Repository) CreateRuneTransactions ¶ added in v0.5.5
func (r *Repository) CreateRuneTransactions(ctx context.Context, txs []*entity.RuneTransaction) error
func (*Repository) DeleteIndexedBlockSinceHeight ¶
func (r *Repository) DeleteIndexedBlockSinceHeight(ctx context.Context, height uint64) error
func (*Repository) DeleteOutPointBalancesSinceHeight ¶
func (r *Repository) DeleteOutPointBalancesSinceHeight(ctx context.Context, height uint64) error
func (*Repository) DeleteRuneBalancesSinceHeight ¶
func (r *Repository) DeleteRuneBalancesSinceHeight(ctx context.Context, height uint64) error
func (*Repository) DeleteRuneEntriesSinceHeight ¶
func (r *Repository) DeleteRuneEntriesSinceHeight(ctx context.Context, height uint64) error
func (*Repository) DeleteRuneEntryStatesSinceHeight ¶
func (r *Repository) DeleteRuneEntryStatesSinceHeight(ctx context.Context, height uint64) error
func (*Repository) DeleteRuneTransactionsSinceHeight ¶
func (r *Repository) DeleteRuneTransactionsSinceHeight(ctx context.Context, height uint64) error
func (*Repository) DeleteRunestonesSinceHeight ¶
func (r *Repository) DeleteRunestonesSinceHeight(ctx context.Context, height uint64) error
func (*Repository) GetBalanceByPkScriptAndRuneId ¶
func (*Repository) GetBalancesByPkScript ¶
func (*Repository) GetBalancesByRuneId ¶
func (*Repository) GetIndexedBlockByHeight ¶
func (r *Repository) GetIndexedBlockByHeight(ctx context.Context, height int64) (*entity.IndexedBlock, error)
func (*Repository) GetLatestBlock ¶
func (r *Repository) GetLatestBlock(ctx context.Context) (types.BlockHeader, error)
warning: GetLatestBlock currently returns a types.BlockHeader with only Height, Hash, and PrevBlock fields populated. This is because it is known that all usage of this function only requires these fields. In the future, we may want to populate all fields for type safety.
func (*Repository) GetLatestIndexerState ¶
func (r *Repository) GetLatestIndexerState(ctx context.Context) (entity.IndexerState, error)
func (*Repository) GetLatestIndexerStats ¶
func (*Repository) GetOngoingRuneEntries ¶ added in v0.4.6
func (*Repository) GetRuneEntries ¶ added in v0.4.6
func (*Repository) GetRuneEntryByRuneId ¶
func (*Repository) GetRuneEntryByRuneIdAndHeight ¶
func (*Repository) GetRuneEntryByRuneIdAndHeightBatch ¶
func (*Repository) GetRuneEntryByRuneIdBatch ¶
func (*Repository) GetRuneIdFromRune ¶
func (*Repository) GetRuneTransaction ¶ added in v0.4.0
func (r *Repository) GetRuneTransaction(ctx context.Context, txHash chainhash.Hash) (*entity.RuneTransaction, error)
func (*Repository) GetRuneTransactions ¶
func (*Repository) GetRunesBalancesAtOutPoint ¶
func (r *Repository) GetRunesBalancesAtOutPoint(ctx context.Context, outPoint wire.OutPoint) (map[runes.RuneId]*entity.OutPointBalance, error)
func (*Repository) GetRunesUTXOsByPkScript ¶ added in v0.3.0
func (*Repository) GetRunesUTXOsByRuneIdAndPkScript ¶ added in v0.3.0
func (*Repository) GetTotalHoldersByRuneIds ¶ added in v0.4.6
func (*Repository) SetIndexerState ¶
func (r *Repository) SetIndexerState(ctx context.Context, state entity.IndexerState) error
func (*Repository) SpendOutPointBalancesBatch ¶ added in v0.5.5
func (*Repository) UnspendOutPointBalancesSinceHeight ¶
func (r *Repository) UnspendOutPointBalancesSinceHeight(ctx context.Context, height uint64) error
func (*Repository) UpdateIndexerStats ¶
Click to show internal directories.
Click to hide internal directories.