Documentation ¶
Index ¶
- func IsVoteExist(dbTx *gorm.DB, channelId uint8, sequence uint64, pubKey string) (bool, error)
- func SaveVote(dbTx *gorm.DB, vote *model.Vote) error
- func UpdateBatchPackagesStatus(dbTx *gorm.DB, txIds []int64, status db.TxStatus) error
- func UpdateTransactionStatus(dbTx *gorm.DB, id int64, status db.TxStatus) error
- type BSCDao
- func (d *BSCDao) DeleteBlockAndPackagesAndVotesAtHeight(height uint64) error
- func (d *BSCDao) DeleteBlocksBelowHeight(threshHold int64) error
- func (d *BSCDao) DeletePackagesBelowHeightWithLimit(threshHold int64, limit int) error
- func (d *BSCDao) ExistsUnprocessedPackage(threshHold int64) (bool, error)
- func (d *BSCDao) GetLatestBlock() (*model.BscBlock, error)
- func (d *BSCDao) GetLatestOracleSequenceByStatus(status db.TxStatus) (int64, error)
- func (d *BSCDao) GetLeastSavedPackagesHeight() (uint64, error)
- func (d *BSCDao) GetPackagesByHeightAndStatus(status db.TxStatus, height uint64) ([]*model.BscRelayPackage, error)
- func (d *BSCDao) GetPackagesByOracleSequence(sequence uint64) ([]*model.BscRelayPackage, error)
- func (d *BSCDao) GetPackagesByStatus(status db.TxStatus) ([]*model.BscRelayPackage, error)
- func (d *BSCDao) SaveBatchPackages(pkgs []*model.BscRelayPackage) error
- func (d *BSCDao) SaveBlockAndBatchPackages(b *model.BscBlock, pkgs []*model.BscRelayPackage) error
- func (d *BSCDao) UpdateBatchPackagesClaimedTxHash(txIds []int64, claimTxHash string) error
- func (d *BSCDao) UpdateBatchPackagesStatus(txIds []int64, status db.TxStatus) error
- func (d *BSCDao) UpdateBatchPackagesStatusAndClaimedTxHash(txIds []int64, status db.TxStatus, claimTxHash string) error
- func (d *BSCDao) UpdateBatchPackagesStatusToDelivered(seq uint64) error
- type DaoManager
- type GreenfieldDao
- func (d *GreenfieldDao) DeleteBlocksBelowHeight(threshHold int64) error
- func (d *GreenfieldDao) DeleteTransactionsBelowHeightWithLimit(threshHold int64, limit int) error
- func (d *GreenfieldDao) ExistsUnprocessedTransaction(threshHold int64) (bool, error)
- func (d *GreenfieldDao) GetLatestBlock() (*model.GreenfieldBlock, error)
- func (d *GreenfieldDao) GetLatestSequenceByChannelIdAndStatus(channelId types.ChannelId, status db.TxStatus) (int64, error)
- func (d *GreenfieldDao) GetLatestSyncedTransaction() (*model.SyncLightBlockTransaction, error)
- func (d *GreenfieldDao) GetLeastSavedTransactionHeight() (uint64, error)
- func (d *GreenfieldDao) GetTransactionByChannelIdAndSequence(channelId types.ChannelId, sequence uint64) (*model.GreenfieldRelayTransaction, error)
- func (d *GreenfieldDao) GetTransactionsByStatusWithLimit(s db.TxStatus, limit int64) ([]*model.GreenfieldRelayTransaction, error)
- func (d *GreenfieldDao) SaveBlockAndBatchTransactions(b *model.GreenfieldBlock, txs []*model.GreenfieldRelayTransaction) error
- func (d *GreenfieldDao) SaveSyncLightBlockTransaction(t *model.SyncLightBlockTransaction) error
- func (d *GreenfieldDao) UpdateBatchTransactionStatusToDelivered(seq uint64) error
- func (d *GreenfieldDao) UpdateTransactionClaimedTxHash(id int64, claimedTxHash string) error
- func (d *GreenfieldDao) UpdateTransactionStatus(id int64, status db.TxStatus) error
- func (d *GreenfieldDao) UpdateTransactionStatusAndClaimedTxHash(id int64, status db.TxStatus, claimedTxHash string) error
- type VoteDao
- func (d *VoteDao) DeleteVotesBelowHeightWithLimit(threshHold int64, eventType uint32, limit int) error
- func (d *VoteDao) GetVoteByChannelIdAndSequenceAndPubKey(channelId uint8, sequence uint64, pubKey string) (*model.Vote, error)
- func (d *VoteDao) GetVotesByChannelIdAndSequence(channelId uint8, sequence uint64) ([]*model.Vote, error)
- func (d *VoteDao) GetVotesCountByChannelIdAndSequence(channelId uint8, sequence uint64) (int64, error)
- func (d *VoteDao) IsVoteExist(channelId uint8, sequence uint64, pubKey string) (bool, error)
- func (d *VoteDao) SaveBatchVotes(votes []*model.Vote) error
- func (d *VoteDao) SaveVote(vote *model.Vote) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IsVoteExist ¶ added in v0.0.7
func UpdateBatchPackagesStatus ¶ added in v0.0.7
Types ¶
type BSCDao ¶
func (*BSCDao) DeleteBlockAndPackagesAndVotesAtHeight ¶ added in v1.1.0
func (*BSCDao) DeleteBlocksBelowHeight ¶ added in v0.2.4
func (*BSCDao) DeletePackagesBelowHeightWithLimit ¶ added in v0.2.4
func (*BSCDao) ExistsUnprocessedPackage ¶ added in v0.2.4
func (*BSCDao) GetLatestOracleSequenceByStatus ¶ added in v0.0.4
func (*BSCDao) GetLeastSavedPackagesHeight ¶
func (*BSCDao) GetPackagesByHeightAndStatus ¶ added in v0.0.7
func (*BSCDao) GetPackagesByOracleSequence ¶ added in v0.0.4
func (d *BSCDao) GetPackagesByOracleSequence(sequence uint64) ([]*model.BscRelayPackage, error)
func (*BSCDao) GetPackagesByStatus ¶
func (*BSCDao) SaveBatchPackages ¶
func (d *BSCDao) SaveBatchPackages(pkgs []*model.BscRelayPackage) error
func (*BSCDao) SaveBlockAndBatchPackages ¶
func (*BSCDao) UpdateBatchPackagesClaimedTxHash ¶ added in v0.0.3
func (*BSCDao) UpdateBatchPackagesStatus ¶
func (*BSCDao) UpdateBatchPackagesStatusAndClaimedTxHash ¶
func (*BSCDao) UpdateBatchPackagesStatusToDelivered ¶ added in v0.0.4
type DaoManager ¶
type DaoManager struct { GreenfieldDao *GreenfieldDao VoteDao *VoteDao BSCDao *BSCDao }
func NewDaoManager ¶
func NewDaoManager(greenfieldDao *GreenfieldDao, bscDao *BSCDao, voteDao *VoteDao) *DaoManager
type GreenfieldDao ¶
func NewGreenfieldDao ¶
func NewGreenfieldDao(db *gorm.DB) *GreenfieldDao
func (*GreenfieldDao) DeleteBlocksBelowHeight ¶ added in v0.2.4
func (d *GreenfieldDao) DeleteBlocksBelowHeight(threshHold int64) error
func (*GreenfieldDao) DeleteTransactionsBelowHeightWithLimit ¶ added in v0.2.4
func (d *GreenfieldDao) DeleteTransactionsBelowHeightWithLimit(threshHold int64, limit int) error
func (*GreenfieldDao) ExistsUnprocessedTransaction ¶ added in v0.2.4
func (d *GreenfieldDao) ExistsUnprocessedTransaction(threshHold int64) (bool, error)
func (*GreenfieldDao) GetLatestBlock ¶
func (d *GreenfieldDao) GetLatestBlock() (*model.GreenfieldBlock, error)
func (*GreenfieldDao) GetLatestSequenceByChannelIdAndStatus ¶ added in v0.0.4
func (*GreenfieldDao) GetLatestSyncedTransaction ¶ added in v0.0.7
func (d *GreenfieldDao) GetLatestSyncedTransaction() (*model.SyncLightBlockTransaction, error)
func (*GreenfieldDao) GetLeastSavedTransactionHeight ¶
func (d *GreenfieldDao) GetLeastSavedTransactionHeight() (uint64, error)
func (*GreenfieldDao) GetTransactionByChannelIdAndSequence ¶ added in v0.0.4
func (d *GreenfieldDao) GetTransactionByChannelIdAndSequence(channelId types.ChannelId, sequence uint64) (*model.GreenfieldRelayTransaction, error)
func (*GreenfieldDao) GetTransactionsByStatusWithLimit ¶ added in v0.0.7
func (d *GreenfieldDao) GetTransactionsByStatusWithLimit(s db.TxStatus, limit int64) ([]*model.GreenfieldRelayTransaction, error)
func (*GreenfieldDao) SaveBlockAndBatchTransactions ¶
func (d *GreenfieldDao) SaveBlockAndBatchTransactions(b *model.GreenfieldBlock, txs []*model.GreenfieldRelayTransaction) error
func (*GreenfieldDao) SaveSyncLightBlockTransaction ¶ added in v0.0.3
func (d *GreenfieldDao) SaveSyncLightBlockTransaction(t *model.SyncLightBlockTransaction) error
func (*GreenfieldDao) UpdateBatchTransactionStatusToDelivered ¶ added in v0.0.4
func (d *GreenfieldDao) UpdateBatchTransactionStatusToDelivered(seq uint64) error
func (*GreenfieldDao) UpdateTransactionClaimedTxHash ¶ added in v0.0.3
func (d *GreenfieldDao) UpdateTransactionClaimedTxHash(id int64, claimedTxHash string) error
func (*GreenfieldDao) UpdateTransactionStatus ¶
func (d *GreenfieldDao) UpdateTransactionStatus(id int64, status db.TxStatus) error
func (*GreenfieldDao) UpdateTransactionStatusAndClaimedTxHash ¶
type VoteDao ¶
func NewVoteDao ¶
func (*VoteDao) DeleteVotesBelowHeightWithLimit ¶ added in v0.2.4
func (*VoteDao) GetVoteByChannelIdAndSequenceAndPubKey ¶
func (*VoteDao) GetVotesByChannelIdAndSequence ¶
func (*VoteDao) GetVotesCountByChannelIdAndSequence ¶ added in v0.0.4
func (*VoteDao) IsVoteExist ¶
Click to show internal directories.
Click to hide internal directories.