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) CreateRuneEntry(ctx context.Context, entry *runes.RuneEntry, blockHeight uint64) error
- func (r *Repository) CreateRuneEntryState(ctx context.Context, entry *runes.RuneEntry, blockHeight uint64) error
- func (r *Repository) CreateRuneTransaction(ctx context.Context, tx *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) (map[runes.RuneId]*entity.Balance, error)
- func (r *Repository) GetBalancesByRuneId(ctx context.Context, runeId runes.RuneId, blockHeight uint64) ([]*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) 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) GetRuneTransactions(ctx context.Context, pkScript []byte, runeId runes.RuneId, height uint64) ([]*entity.RuneTransaction, error)
- func (r *Repository) GetRunesBalancesAtOutPoint(ctx context.Context, outPoint wire.OutPoint) (map[runes.RuneId]*entity.OutPointBalance, error)
- func (r *Repository) GetUnspentOutPointBalancesByPkScript(ctx context.Context, pkScript []byte, blockHeight uint64) ([]*entity.OutPointBalance, error)
- func (r *Repository) Rollback(ctx context.Context) error
- func (r *Repository) SetIndexerState(ctx context.Context, state entity.IndexerState) error
- func (r *Repository) SpendOutPointBalances(ctx context.Context, outPoint 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) CreateRuneEntry ¶
func (*Repository) CreateRuneEntryState ¶
func (*Repository) CreateRuneTransaction ¶
func (r *Repository) CreateRuneTransaction(ctx context.Context, tx *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) GetRuneEntryByRuneId ¶
func (*Repository) GetRuneEntryByRuneIdAndHeight ¶
func (*Repository) GetRuneEntryByRuneIdAndHeightBatch ¶
func (*Repository) GetRuneEntryByRuneIdBatch ¶
func (*Repository) GetRuneIdFromRune ¶
func (*Repository) GetRuneTransactions ¶
func (r *Repository) GetRuneTransactions(ctx context.Context, pkScript []byte, runeId runes.RuneId, height uint64) ([]*entity.RuneTransaction, error)
func (*Repository) GetRunesBalancesAtOutPoint ¶
func (r *Repository) GetRunesBalancesAtOutPoint(ctx context.Context, outPoint wire.OutPoint) (map[runes.RuneId]*entity.OutPointBalance, error)
func (*Repository) GetUnspentOutPointBalancesByPkScript ¶
func (r *Repository) GetUnspentOutPointBalancesByPkScript(ctx context.Context, pkScript []byte, blockHeight uint64) ([]*entity.OutPointBalance, error)
func (*Repository) SetIndexerState ¶
func (r *Repository) SetIndexerState(ctx context.Context, state entity.IndexerState) error
func (*Repository) SpendOutPointBalances ¶
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.