db

package
Version: v0.0.0-...-ac04cce Latest Latest
Warning

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

Go to latest
Published: Jan 21, 2016 License: GPL-2.0 Imports: 7 Imported by: 0

Documentation

Overview

Package db implements a DB connection and DB operations

It user config parameters:

DB_USERNAME			- username for DB connection
DB_PASSWORD			- paassword for DB connection
DB_NAME				- Database Name for DB connection
DB_ADDRESS			- IP address for DB connection
DB_SSLMODE			- enable/disable SSH mode in DB connection
DB_PORT				- port for DB connection

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DB

func DB(db *Database) gin.HandlerFunc

Connect to DB and return DB connection handler

Types

type Database

type Database struct {
	DB *gorm.DB
}

func (*Database) Init

func (db *Database) Init(conf cfg.Config)

Initialize DB

Source Files

Jump to

Keyboard shortcuts

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