database

package
v0.0.0-...-9b00f04 Latest Latest
Warning

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

Go to latest
Published: Jan 2, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildConnectionString

func BuildConnectionString() string

BuildConnectionString builds the postgresql connection string from viper configuration

func SetupPostgisExtension

func SetupPostgisExtension(db Handle) error

SetupPostgisExtension sets up the postgis extension if not present

func WaitForWorkingConnection

func WaitForWorkingConnection(db Handle) error

WaitForWorkingConnection retries till you can make a connection to the database

Types

type Handle

type Handle interface {
	Query(query string, args ...interface{}) (*sql.Rows, error)
	Exec(query string, args ...interface{}) (sql.Result, error)
}

Handle interface that describes the methods on our database dependency

Directories

Path Synopsis
Code generated by counterfeiter.
Code generated by counterfeiter.

Jump to

Keyboard shortcuts

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