func New(conf DBJSONModel) (*DB, error) {
	db, err := sqlx.Connect("mysql", conf.DSN)
	if err != nil {
		return nil, errors.Maskf(err, "connect")
	}
	return &DB{DB: db, prefix: conf.TablePrefix}, nil
}
New validates conf and connects to the database specified in conf.
package db
import (
	"database/sql"
	"fmt"
	"strings"
	log "github.com/sirupsen/logrus"
	_ "github.com/go-sql-driver/mysql"
	"github.com/jmoiron/sqlx"
	"github.com/juju/errors"
)
type DB struct {
	*sqlx.DB
	prefix string
}
type DBJSONModel struct {
	DSN         string
	TablePrefix string
}