database

package
v0.0.0-...-2ca40e5 Latest Latest
Warning

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

Go to latest
Published: Oct 17, 2017 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DatabaseConnector

type DatabaseConnector interface {
	Connection() *gorm.DB
	Parse() DatabaseConnector
}

func FactoryDatabase

func FactoryDatabase(typeDB string) (DatabaseConnector, error)

type DatabaseMysql

type DatabaseMysql struct {
	Login        string
	Password     string
	DatabaseName string
}

func (*DatabaseMysql) Connection

func (m *DatabaseMysql) Connection() *gorm.DB

func (*DatabaseMysql) Parse

func (m *DatabaseMysql) Parse() DatabaseConnector

type DatabasePostgres

type DatabasePostgres struct {
	User         string
	Host         string
	Login        string
	Password     string
	DatabaseName string
	SslMode      string
}

func (*DatabasePostgres) Connection

func (m *DatabasePostgres) Connection() *gorm.DB

func (*DatabasePostgres) Parse

type SQLServer

type SQLServer struct {
	UserName     string
	Password     string
	Host         string
	DatabaseName string
}

func (*SQLServer) Connection

func (m *SQLServer) Connection() *gorm.DB

func (*SQLServer) Parse

func (m *SQLServer) Parse() DatabaseConnector

type Sqlite3

type Sqlite3 struct {
	Path string
}

func (*Sqlite3) Connection

func (m *Sqlite3) Connection() *gorm.DB

func (*Sqlite3) Parse

func (m *Sqlite3) Parse() DatabaseConnector

Jump to

Keyboard shortcuts

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