database

package
Version: v0.0.0-...-24b4de3 Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2018 License: GPL-2.0-only Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DSN

func DSN(mi PostgreInfo) string

DSN returns the Data Source Name postgres://username:password@localhost:port/db_name?sslmode=disable

Types

type Info

type Info struct {
	// Database type
	Type Type
	// Postgre info if used
	Postgre PostgreInfo
}

Info contains the database configurations

type PostgreInfo

type PostgreInfo struct {
	Username  string
	Password  string
	Name      string
	Hostname  string
	Port      int
	Parameter string
	PageLimit int
}

PostgreInfo is the details for the database connection

type Type

type Type string

Type is the type of database from a Type* constant

const (
	// TypePostgre is Postgre
	TypePostgre Type = "Postgre"
)

Source Files

Jump to

Keyboard shortcuts

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