postgres

package
v0.3.0-brc20-1 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2024 License: GPL-3.0 Imports: 19 Imported by: 0

Documentation

Index

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) BeginBRC20Tx

func (*Repository) Commit

func (r *Repository) Commit(ctx context.Context) error

func (*Repository) CreateEventDeploys

func (r *Repository) CreateEventDeploys(ctx context.Context, events []*entity.EventDeploy) error

func (*Repository) CreateEventInscribeTransfers

func (r *Repository) CreateEventInscribeTransfers(ctx context.Context, events []*entity.EventInscribeTransfer) error

func (*Repository) CreateEventMints

func (r *Repository) CreateEventMints(ctx context.Context, events []*entity.EventMint) error

func (*Repository) CreateEventTransferTransfers

func (r *Repository) CreateEventTransferTransfers(ctx context.Context, events []*entity.EventTransferTransfer) error

func (*Repository) CreateIndexedBlock

func (r *Repository) CreateIndexedBlock(ctx context.Context, block *entity.IndexedBlock) error

func (*Repository) CreateIndexerState

func (r *Repository) CreateIndexerState(ctx context.Context, state entity.IndexerState) error

func (*Repository) CreateInscriptionEntries

func (r *Repository) CreateInscriptionEntries(ctx context.Context, blockHeight uint64, entries []*ordinals.InscriptionEntry) error

func (*Repository) CreateInscriptionEntryStates

func (r *Repository) CreateInscriptionEntryStates(ctx context.Context, blockHeight uint64, entryStates []*ordinals.InscriptionEntry) error

func (*Repository) CreateInscriptionTransfers

func (r *Repository) CreateInscriptionTransfers(ctx context.Context, transfers []*entity.InscriptionTransfer) error

func (*Repository) CreateProcessorStats

func (r *Repository) CreateProcessorStats(ctx context.Context, stats *entity.ProcessorStats) error

func (*Repository) CreateTickEntries

func (r *Repository) CreateTickEntries(ctx context.Context, blockHeight uint64, entries []*entity.TickEntry) error

func (*Repository) CreateTickEntryStates

func (r *Repository) CreateTickEntryStates(ctx context.Context, blockHeight uint64, entryStates []*entity.TickEntry) error

func (*Repository) DeleteBalancesSinceHeight

func (r *Repository) DeleteBalancesSinceHeight(ctx context.Context, height uint64) error

func (*Repository) DeleteEventDeploysSinceHeight

func (r *Repository) DeleteEventDeploysSinceHeight(ctx context.Context, height uint64) error

func (*Repository) DeleteEventInscribeTransfersSinceHeight

func (r *Repository) DeleteEventInscribeTransfersSinceHeight(ctx context.Context, height uint64) error

func (*Repository) DeleteEventMintsSinceHeight

func (r *Repository) DeleteEventMintsSinceHeight(ctx context.Context, height uint64) error

func (*Repository) DeleteEventTransferTransfersSinceHeight

func (r *Repository) DeleteEventTransferTransfersSinceHeight(ctx context.Context, height uint64) error

func (*Repository) DeleteIndexedBlocksSinceHeight

func (r *Repository) DeleteIndexedBlocksSinceHeight(ctx context.Context, height uint64) error

func (*Repository) DeleteInscriptionEntriesSinceHeight

func (r *Repository) DeleteInscriptionEntriesSinceHeight(ctx context.Context, height uint64) error

func (*Repository) DeleteInscriptionEntryStatesSinceHeight

func (r *Repository) DeleteInscriptionEntryStatesSinceHeight(ctx context.Context, height uint64) error

func (*Repository) DeleteInscriptionTransfersSinceHeight

func (r *Repository) DeleteInscriptionTransfersSinceHeight(ctx context.Context, height uint64) error

func (*Repository) DeleteProcessorStatsSinceHeight

func (r *Repository) DeleteProcessorStatsSinceHeight(ctx context.Context, height uint64) error

func (*Repository) DeleteTickEntriesSinceHeight

func (r *Repository) DeleteTickEntriesSinceHeight(ctx context.Context, height uint64) error

func (*Repository) DeleteTickEntryStatesSinceHeight

func (r *Repository) DeleteTickEntryStatesSinceHeight(ctx context.Context, height uint64) error

func (*Repository) GetBalancesBatchAtHeight

func (r *Repository) GetBalancesBatchAtHeight(ctx context.Context, blockHeight uint64, queries []datagateway.GetBalancesBatchAtHeightQuery) (map[string]map[string]*entity.Balance, error)

func (*Repository) GetEventInscribeTransfersByInscriptionIds

func (r *Repository) GetEventInscribeTransfersByInscriptionIds(ctx context.Context, ids []ordinals.InscriptionId) (map[ordinals.InscriptionId]*entity.EventInscribeTransfer, error)

func (*Repository) GetIndexedBlockByHeight

func (r *Repository) GetIndexedBlockByHeight(ctx context.Context, height int64) (*entity.IndexedBlock, error)

GetIndexedBlockByHeight implements datagateway.BRC20DataGateway.

func (*Repository) GetInscriptionEntriesByIds

func (r *Repository) GetInscriptionEntriesByIds(ctx context.Context, ids []ordinals.InscriptionId) (map[ordinals.InscriptionId]*ordinals.InscriptionEntry, error)

func (*Repository) GetInscriptionNumbersByIds

func (r *Repository) GetInscriptionNumbersByIds(ctx context.Context, ids []ordinals.InscriptionId) (map[ordinals.InscriptionId]int64, error)

func (*Repository) GetInscriptionParentsByIds

func (r *Repository) GetInscriptionParentsByIds(ctx context.Context, ids []ordinals.InscriptionId) (map[ordinals.InscriptionId]ordinals.InscriptionId, error)

func (*Repository) GetInscriptionTransfersInOutPoints

func (r *Repository) GetInscriptionTransfersInOutPoints(ctx context.Context, outPoints []wire.OutPoint) (map[ordinals.SatPoint][]*entity.InscriptionTransfer, error)

func (*Repository) GetLatestBlock

func (r *Repository) GetLatestBlock(ctx context.Context) (types.BlockHeader, error)

warning: GetLatestBlock currently returns a types.BlockHeader with only Height and Hash 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) GetLatestEventId

func (r *Repository) GetLatestEventId(ctx context.Context) (uint64, error)

func (*Repository) GetLatestIndexerState

func (r *Repository) GetLatestIndexerState(ctx context.Context) (entity.IndexerState, error)

func (*Repository) GetProcessorStats

func (r *Repository) GetProcessorStats(ctx context.Context) (*entity.ProcessorStats, error)

func (*Repository) GetTickEntriesByTicks

func (r *Repository) GetTickEntriesByTicks(ctx context.Context, ticks []string) (map[string]*entity.TickEntry, error)

func (*Repository) Rollback

func (r *Repository) Rollback(ctx context.Context) error

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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