postgres

package
v0.0.0-...-cb2c959 Latest Latest
Warning

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

Go to latest
Published: Nov 17, 2018 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(db *sql.DB) (*store.Service, error)

New returns a new Service.

func NewFromOptions

func NewFromOptions(options Options) (*store.Service, error)

NewFromOptions will connect to a postgresql server with given options

Types

type Options

type Options struct {
	User, Pass       string
	Host             string
	Port             int
	DBName           string
	SSLMode          string
	StatementTimeout int
}

Options holds information for connecting to a postgres instance

func (Options) ConnectionInfo

func (o Options) ConnectionInfo() string

ConnectionInfo returns the postgresql connection string from an options struct.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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