sqlitestore

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Nov 14, 2025 License: GPL-3.0 Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Migrate

func Migrate(db *sql.DB) error

Types

type BLOCKPOINTER

type BLOCKPOINTER struct {
	Name        string
	BlockNumber *int64
	BlockTime   *int64
}

type DBTX

type DBTX interface {
	ExecContext(context.Context, string, ...interface{}) (sql.Result, error)
	PrepareContext(context.Context, string) (*sql.Stmt, error)
	QueryContext(context.Context, string, ...interface{}) (*sql.Rows, error)
	QueryRowContext(context.Context, string, ...interface{}) *sql.Row
}

type FindMatchingL1DepositsParams

type FindMatchingL1DepositsParams struct {
	MatchingHash   []byte
	BlockTimestamp int64
}

type FindMatchingL1DepositsRow

type FindMatchingL1DepositsRow struct {
	ID             int64
	BlockTimestamp int64
	MatchingHash   []byte
}

type FindMatchingL2DepositsParams

type FindMatchingL2DepositsParams struct {
	MatchingHash   []byte
	BlockTimestamp int64
}

type FindMatchingL2DepositsRow

type FindMatchingL2DepositsRow struct {
	ID             int64
	BlockTimestamp int64
	MatchingHash   []byte
}

type GetBlockPointerRow

type GetBlockPointerRow struct {
	BlockNumber *int64
	BlockTime   *int64
}

type GetBridgeStatsRow

type GetBridgeStatsRow struct {
	TotalMatched    int64
	AvgTimeDiff     *float64
	MinTimeDiff     interface{}
	MaxTimeDiff     interface{}
	TotalBridgedEth *float64
}

type GetLatestL1BlockRow

type GetLatestL1BlockRow struct {
	BlockNumber    *int64
	BlockTimestamp *int64
}

type GetLatestL2BlockRow

type GetLatestL2BlockRow struct {
	BlockNumber    *int64
	BlockTimestamp *int64
}

type GetMatchedDepositsParams

type GetMatchedDepositsParams struct {
	Limit  int64
	Offset int64
}

type GetMatchedDepositsRow

type GetMatchedDepositsRow struct {
	ID              int64
	FromAddress     []byte
	ToAddress       []byte
	Amount          float64
	L1BlockNumber   int64
	L2BlockNumber   int64
	L1Timestamp     int64
	L2Timestamp     int64
	TimeDiffSeconds interface{}
	TxHashL1        []byte
	TxHashL2        []byte
}

type GetTimeSeriesChartDataRow

type GetTimeSeriesChartDataRow struct {
	Timestamp       int64
	TimeDiffSeconds interface{}
}

type GetUnmatchedDepositsParams

type GetUnmatchedDepositsParams struct {
	Limit  int64
	Offset int64
}

type GetUnmatchedDepositsRow

type GetUnmatchedDepositsRow struct {
	ID               int64
	FromAddress      []byte
	ToAddress        []byte
	Amount           float64
	L1BlockNumber    int64
	L1Timestamp      int64
	TxHashL1         []byte
	TimeSinceSeconds interface{}
}

type InsertL1StandardBridgeETHDepositInitiatedParams

type InsertL1StandardBridgeETHDepositInitiatedParams struct {
	BlockNumber    int64
	BlockTimestamp int64
	TxHash         []byte
	FromAddress    []byte
	ToAddress      []byte
	Amount         float64
	Event          []byte
	MatchingHash   []byte
}

type InsertL2StandardBridgeDepositFinalizedParams

type InsertL2StandardBridgeDepositFinalizedParams struct {
	BlockNumber    int64
	BlockTimestamp int64
	TxHash         []byte
	FromAddress    []byte
	ToAddress      []byte
	L1Token        []byte
	Amount         float64
	Event          []byte
	MatchingHash   []byte
}

type L1StandardBridgeEthDepositInitiated

type L1StandardBridgeEthDepositInitiated struct {
	ID                                        int64
	CreatedAt                                 *time.Time
	UpdatedAt                                 *time.Time
	BlockNumber                               int64
	BlockTimestamp                            int64
	TxHash                                    []byte
	FromAddress                               []byte
	ToAddress                                 []byte
	Amount                                    float64
	Event                                     []byte
	MatchingHash                              []byte
	MatchedL2StandardBridgeDepositFinalizedID *int64
}

type L2StandardBridgeDepositFinalized

type L2StandardBridgeDepositFinalized struct {
	ID                                           int64
	CreatedAt                                    *time.Time
	UpdatedAt                                    *time.Time
	BlockNumber                                  int64
	BlockTimestamp                               int64
	TxHash                                       []byte
	FromAddress                                  []byte
	ToAddress                                    []byte
	L1Token                                      []byte
	Amount                                       float64
	Event                                        []byte
	MatchingHash                                 []byte
	MatchedL1StandardBridgeEthDepositInitiatedID *int64
}

type Queries

type Queries struct {
	// contains filtered or unexported fields
}

func New

func New(db DBTX) *Queries

func Prepare

func Prepare(ctx context.Context, db DBTX) (*Queries, error)

func (*Queries) Close

func (q *Queries) Close() error

func (*Queries) FindMatchingL1Deposits

func (q *Queries) FindMatchingL1Deposits(ctx context.Context, arg FindMatchingL1DepositsParams) ([]FindMatchingL1DepositsRow, error)

func (*Queries) FindMatchingL2Deposits

func (q *Queries) FindMatchingL2Deposits(ctx context.Context, arg FindMatchingL2DepositsParams) ([]FindMatchingL2DepositsRow, error)

func (*Queries) GetBlockPointer

func (q *Queries) GetBlockPointer(ctx context.Context, name string) (GetBlockPointerRow, error)

func (*Queries) GetBridgeStats

func (q *Queries) GetBridgeStats(ctx context.Context) (GetBridgeStatsRow, error)

func (*Queries) GetLatestL1Block

func (q *Queries) GetLatestL1Block(ctx context.Context) (GetLatestL1BlockRow, error)

func (*Queries) GetLatestL2Block

func (q *Queries) GetLatestL2Block(ctx context.Context) (GetLatestL2BlockRow, error)

func (*Queries) GetMatchedDeposits

func (q *Queries) GetMatchedDeposits(ctx context.Context, arg GetMatchedDepositsParams) ([]GetMatchedDepositsRow, error)

Web UI Queries

func (*Queries) GetPendingDeposits

func (q *Queries) GetPendingDeposits(ctx context.Context) (int64, error)

func (*Queries) GetTimeSeriesChartData

func (q *Queries) GetTimeSeriesChartData(ctx context.Context, limit int64) ([]GetTimeSeriesChartDataRow, error)

func (*Queries) GetTotalMatchedDeposits

func (q *Queries) GetTotalMatchedDeposits(ctx context.Context) (int64, error)

func (*Queries) GetTotalUnmatchedDeposits

func (q *Queries) GetTotalUnmatchedDeposits(ctx context.Context) (int64, error)

func (*Queries) GetUnmatchedDeposits

func (q *Queries) GetUnmatchedDeposits(ctx context.Context, arg GetUnmatchedDepositsParams) ([]GetUnmatchedDepositsRow, error)

func (*Queries) InsertL1StandardBridgeETHDepositInitiated

func (q *Queries) InsertL1StandardBridgeETHDepositInitiated(ctx context.Context, arg InsertL1StandardBridgeETHDepositInitiatedParams) (int64, error)

func (*Queries) InsertL2StandardBridgeDepositFinalized

func (q *Queries) InsertL2StandardBridgeDepositFinalized(ctx context.Context, arg InsertL2StandardBridgeDepositFinalizedParams) (int64, error)

func (*Queries) UpdateBlockPointer

func (q *Queries) UpdateBlockPointer(ctx context.Context, arg UpdateBlockPointerParams) error

func (*Queries) UpdateBlockPointerIfNull

func (q *Queries) UpdateBlockPointerIfNull(ctx context.Context, arg UpdateBlockPointerIfNullParams) error

func (*Queries) UpdateL1DepositWithMatch

func (q *Queries) UpdateL1DepositWithMatch(ctx context.Context, arg UpdateL1DepositWithMatchParams) error

func (*Queries) UpdateL2DepositWithMatch

func (q *Queries) UpdateL2DepositWithMatch(ctx context.Context, arg UpdateL2DepositWithMatchParams) error

func (*Queries) WithTx

func (q *Queries) WithTx(tx *sql.Tx) *Queries

type UpdateBlockPointerIfNullParams

type UpdateBlockPointerIfNullParams struct {
	BlockNumber *int64
	BlockTime   *int64
	Name        string
}

type UpdateBlockPointerParams

type UpdateBlockPointerParams struct {
	BlockNumber *int64
	BlockTime   *int64
	Name        string
}

type UpdateL1DepositWithMatchParams

type UpdateL1DepositWithMatchParams struct {
	MatchedL2StandardBridgeDepositFinalizedID *int64
	ID                                        int64
}

type UpdateL2DepositWithMatchParams

type UpdateL2DepositWithMatchParams struct {
	MatchedL1StandardBridgeEthDepositInitiatedID *int64
	ID                                           int64
}

Jump to

Keyboard shortcuts

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