db

package
v0.1.6 Latest Latest
Warning

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

Go to latest
Published: Dec 13, 2018 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MakeConnectionString

func MakeConnectionString(c ConnStr) string

MakeConnectionString return a string that express postgres connection string. Something on form of dbname=test host=localhost user=admin password=acunt

func NewPGEngine

func NewPGEngine(c ConnStr) (*xorm.Engine, error)

NewPGEngine return a new postgres engine from Configuration string.

Types

type ConnStr

type ConnStr struct {
	Host             string
	User             string
	Password         string
	Database         string
	Port             int
	SslMode          int8
	MaxIdleConns     int
	MaxOpenConns     int
	MaxLifetimeConns float64
}

ConnStr contain necessary information to establish secure and non-secure connections with a postgres db

Jump to

Keyboard shortcuts

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