storjscandb

package
v1.0.9 Latest Latest
Warning

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

Go to latest
Published: Aug 2, 2024 License: AGPL-3.0 Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrHeadersDB = errs.Class("HeadersDB")

ErrHeadersDB indicates about internal headers DB error.

View Source
var ErrPriceQuoteDB = errs.Class("PriceQuoteDB")

ErrPriceQuoteDB indicates about internal headers DB error.

View Source
var ErrWalletsDB = errs.Class("WalletsDB")

ErrWalletsDB indicates about internal wallets DB error.

View Source
var (

	// Error is the default storjscandb errs class.
	Error = errs.Class("storjscandb")
)

Functions

This section is empty.

Types

type DB

type DB struct {
	*dbx.DB
	// contains filtered or unexported fields
}

DB is storjscan database.

func Open

func Open(ctx context.Context, log *zap.Logger, databaseURL string) (*DB, error)

Open creates instance of storjscan DB.

func (*DB) Headers

func (db *DB) Headers() blockchain.HeadersDB

Headers creates new headersDB with current DB connection.

func (*DB) MigrateToLatest

func (db *DB) MigrateToLatest(ctx context.Context) error

MigrateToLatest migrates db to the latest version.

func (*DB) Ping

func (db *DB) Ping(ctx context.Context) error

Ping checks if the database connection is available.

func (*DB) PostgresMigration

func (db *DB) PostgresMigration() *migrate.Migration

PostgresMigration returns steps needed for migrating postgres database.

func (*DB) TokenPrice

func (db *DB) TokenPrice() tokenprice.PriceQuoteDB

TokenPrice creates new PriceQuoteDB with current DB connection.

func (*DB) Wallets

func (db *DB) Wallets() wallets.DB

Wallets creates new WalletsDB with current DB connection.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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