Documentation
¶
Overview ¶
templ: version: v0.3.943
Index ¶
- Constants
- func BridgePerformance(stats map[string]interface{}, pathPrefix string) templ.Component
- func Dashboard(pathPrefix string) templ.Component
- func DashboardMetrics(stats map[string]interface{}, pathPrefix string) templ.Component
- func DepositItem(deposit DepositPair) templ.Component
- func DepositsTimelineSection(deposits []DepositPair, page, totalPages int, pathPrefix string) templ.Component
- func GetBridgeStats(ctx context.Context, db *sql.DB) (map[string]interface{}, error)
- func GetTotalMatchedDeposits(ctx context.Context, db *sql.DB) (int, error)
- func GetTotalUnmatchedDeposits(ctx context.Context, db *sql.DB) (int, error)
- func Layout(title string, pathPrefix string) templ.Component
- func TimeSeriesChart(pathPrefix string) templ.Component
- func UnmatchedDepositItem(deposit UnmatchedDeposit) templ.Component
- func UnmatchedDepositsSection(deposits []UnmatchedDeposit, page, totalPages int, pathPrefix string) templ.Component
- type DepositPair
- type Server
- type UnmatchedDeposit
Constants ¶
const (
// ItemsPerPage defines how many deposits to show per page
ItemsPerPage = 10
)
Variables ¶
This section is empty.
Functions ¶
func BridgePerformance ¶
BridgePerformance contains the bridge performance stats
func DashboardMetrics ¶
DashboardMetrics contains the metrics cards
func DepositItem ¶
func DepositItem(deposit DepositPair) templ.Component
DepositItem displays a single deposit
func DepositsTimelineSection ¶
func DepositsTimelineSection(deposits []DepositPair, page, totalPages int, pathPrefix string) templ.Component
DepositsTimelineSection contains the deposits timeline section
func GetBridgeStats ¶
GetBridgeStats returns statistics about the bridge
func GetTotalMatchedDeposits ¶
GetTotalMatchedDeposits returns the total number of matched deposits
func GetTotalUnmatchedDeposits ¶
GetTotalUnmatchedDeposits returns the total number of unmatched deposits
func TimeSeriesChart ¶
TimeSeriesChart displays a chart of deposit time differences over time
func UnmatchedDepositItem ¶
func UnmatchedDepositItem(deposit UnmatchedDeposit) templ.Component
UnmatchedDepositItem displays a single unmatched deposit
func UnmatchedDepositsSection ¶
func UnmatchedDepositsSection(deposits []UnmatchedDeposit, page, totalPages int, pathPrefix string) templ.Component
UnmatchedDepositsSection contains the unmatched deposits section
Types ¶
type DepositPair ¶
type DepositPair struct {
ID int64
FromAddress string
ToAddress string
Amount float64
L1BlockNumber int64
L2BlockNumber int64
L1Timestamp time.Time
L2Timestamp time.Time
TimeDiffSeconds int64
TxHashL1 string
TxHashL2 string
}
DepositPair represents a matched pair of L1 and L2 deposit events
func GetMatchedDeposits ¶
GetMatchedDeposits returns a list of matched deposit pairs with time difference information
type Server ¶
type Server struct {
// contains filtered or unexported fields
}
Server represents the web UI server
type UnmatchedDeposit ¶
type UnmatchedDeposit struct {
ID int64
FromAddress string
ToAddress string
Amount float64
L1BlockNumber int64
L1Timestamp time.Time
TimeSinceSeconds int64
TxHashL1 string
}
UnmatchedDeposit represents an unmatched L1 deposit event
func GetUnmatchedDeposits ¶
func GetUnmatchedDeposits(ctx context.Context, db *sql.DB, limit, offset int) ([]UnmatchedDeposit, error)
GetUnmatchedDeposits returns a list of unmatched L1 deposit events