postgres

package
v0.0.0-...-124f4b1 Latest Latest
Warning

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

Go to latest
Published: Jan 13, 2014 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package postgres provides an implementation of sorted.KeyValue on top of PostgreSQL.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewKeyValue

func NewKeyValue(cfg Config) (sorted.KeyValue, error)

NewKeyValue returns a sorted.KeyValue implementation of the described PostgreSQL database.

func SQLCreateTables

func SQLCreateTables() []string

func SQLDefineReplace

func SQLDefineReplace() []string

func SchemaVersion

func SchemaVersion() int

Types

type Config

type Config struct {
	Host     string // Optional. Defaults to "localhost" in ConfigFromJSON.
	Database string // Required.
	User     string // Required.
	Password string // Optional.
	SSLMode  string // Optional. Defaults to "require" in ConfigFromJSON.
}

Config holds the parameters used to connect to the PostgreSQL db.

func ConfigFromJSON

func ConfigFromJSON(config jsonconfig.Obj) (Config, error)

ConfigFromJSON populates Config from config, and validates config. It returns an error if config fails to validate.

Jump to

Keyboard shortcuts

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