stores

package
v0.2.7 Latest Latest
Warning

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

Go to latest
Published: Nov 27, 2023 License: Apache-2.0 Imports: 5 Imported by: 4

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewDepositStore

func NewDepositStore(db *gorm.DB) *depositStore

Types

type BridgeStore

type BridgeStore interface {
	GetDepositStore() DepositStore
	GetWithdrawalStore() WithdrawalStore
	GetTaskStore() TaskStore
	GetProcessedReceiptStore() ProcessedReceiptStore
}

func NewBridgeStore

func NewBridgeStore(db *gorm.DB) BridgeStore

type DepositStore

type DepositStore interface {
	Save(deposit *models.Deposit) error
}

type ProcessedReceiptStore

type ProcessedReceiptStore interface {
	Save(taskId int, receiptId int64) error
}

func NewProcessedReceiptStore

func NewProcessedReceiptStore(db *gorm.DB) ProcessedReceiptStore

type TaskStore

type TaskStore interface {
	Save(task *models.Task) error
	Update(task *models.Task) error
	GetTasks(chain, status string, limit, retrySeconds int, before int64, excludeIds []int) ([]*models.Task, error)
	UpdateTasksWithTransactionHash(txs []string, transactionStatus int, status string) error
	DeleteTasks([]string, uint64) error
	Count() int64
	ResetTo(ids []string, status string) error
	CountTasks(chain, status string) (int64, error)
}

func NewTaskStore

func NewTaskStore(db *gorm.DB) TaskStore

type WithdrawalStore

type WithdrawalStore interface {
	Save(withdraw *models.Withdrawal) error
	Update(withdraw *models.Withdrawal) error
	GetWithdrawalById(withdrawalId int64) (*models.Withdrawal, error)
}

func NewWithdrawalStore

func NewWithdrawalStore(db *gorm.DB) WithdrawalStore

Jump to

Keyboard shortcuts

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