db

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Oct 11, 2022 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package db provides the database for the consumer service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConsumerDB

type ConsumerDB interface {
	ConsumerDBWriter
	ConsumerDBReader
}

ConsumerDB is the interface for the ConsumerDB.

type ConsumerDBReader

type ConsumerDBReader interface {
	// ReadBlockNumberByChainID reads an event from the database by chainID.
	ReadBlockNumberByChainID(ctx context.Context, eventType int8, chainID uint32) (*uint64, error)
	// DB gets the underlying gorm db.
	DB() *gorm.DB
}

ConsumerDBReader is the interface for reading events from the ConsumerDB.

type ConsumerDBWriter

type ConsumerDBWriter interface {
	// StoreEvent stores an event.
	StoreEvent(ctx context.Context, bridgeEvent bridge.EventLog, swapEvent swap.EventLog, chainID uint32, tokenID *string) error
}

ConsumerDBWriter is the interface for writing to the ConsumerDB.

Directories

Path Synopsis
Package sql contains the sql store.
Package sql contains the sql store.

Jump to

Keyboard shortcuts

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