db

package
v0.11.1 Latest Latest
Warning

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

Go to latest
Published: Nov 23, 2017 License: Apache-2.0, BSD-2-Clause-Views, BSD-3-Clause, + 1 more Imports: 4 Imported by: 0

Documentation

Overview

Package db provides helpers to connect to test databases. It has no internal dependencies on horizon and so should be able to be imported by any horizon package.

Index

Constants

View Source
const (
	// DefaultHorizonURL is the default postgres connection string for
	// horizon's test database.
	DefaultHorizonURL = "postgres://localhost:5432/horizon_test?sslmode=disable"

	// DefaultStellarCoreURL is the default postgres connection string
	// for horizon's test stellar core database.
	DefaultStellarCoreURL = "postgres://localhost:5432/stellar-core_test?sslmode=disable"
)

Variables

This section is empty.

Functions

func Horizon

func Horizon() *sqlx.DB

Horizon returns a connection to the horizon test database

func HorizonURL

func HorizonURL() string

HorizonURL returns the database connection the url any test use when connecting to the history/horizon database

func OpenDatabase

func OpenDatabase(dsn string) *sqlx.DB

OpenDatabase opens a database, panicing if it cannot

func StellarCore

func StellarCore() *sqlx.DB

StellarCore returns a connection to the stellar core test database

func StellarCoreURL

func StellarCoreURL() string

StellarCoreURL returns the database connection the url any test use when connecting to the stellar-core database

Types

This section is empty.

Jump to

Keyboard shortcuts

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