Documentation
¶
Index ¶
- Variables
- type DestinationTx
- type IndexingTimestamps
- type Repository
- func (s *Repository) GetCurrentBlock(ctx context.Context, blockchain string, defaultBlock int64) (int64, error)
- func (s *Repository) GetGlobalTransactionByID(ctx context.Context, id string) (TransactionUpdate, error)
- func (s *Repository) UpdateWatcherBlock(ctx context.Context, chainID sdk.ChainID, watcherBlock WatcherBlock) error
- func (s *Repository) UpsertGlobalTransaction(ctx context.Context, chainID sdk.ChainID, globalTx TransactionUpdate) error
- type TransactionUpdate
- type WatcherBlock
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDocNotFound = errors.New("NOT FOUND")
repository errors
Functions ¶
This section is empty.
Types ¶
type DestinationTx ¶
type DestinationTx struct { ChainID vaa.ChainID `bson:"chainId"` Status string `bson:"status"` Method string `bson:"method"` TxHash string `bson:"txHash"` From string `bson:"from"` To string `bson:"to"` BlockNumber string `bson:"blockNumber"` Timestamp *time.Time `bson:"timestamp"` UpdatedAt *time.Time `bson:"updatedAt"` }
DestinationTx representa a destination transaction.
type IndexingTimestamps ¶
type Repository ¶
type Repository struct {
// contains filtered or unexported fields
}
Repository definitions.
func NewRepository ¶
func NewRepository(db *mongo.Database, metrics metrics.Metrics, alerts alert.AlertClient, log *zap.Logger) *Repository
NewRepository create a new respository instance.
func (*Repository) GetCurrentBlock ¶
func (*Repository) GetGlobalTransactionByID ¶
func (s *Repository) GetGlobalTransactionByID(ctx context.Context, id string) (TransactionUpdate, error)
func (*Repository) UpdateWatcherBlock ¶
func (s *Repository) UpdateWatcherBlock(ctx context.Context, chainID sdk.ChainID, watcherBlock WatcherBlock) error
func (*Repository) UpsertGlobalTransaction ¶
func (s *Repository) UpsertGlobalTransaction(ctx context.Context, chainID sdk.ChainID, globalTx TransactionUpdate) error
type TransactionUpdate ¶
type TransactionUpdate struct { ID string `bson:"_id"` Destination DestinationTx `bson:"destinationTx"` }
TransactionUpdate represents a transaction document.
func (*TransactionUpdate) ToMap ¶
func (t *TransactionUpdate) ToMap() map[string]string
Click to show internal directories.
Click to hide internal directories.