gorp

package
v0.0.0-...-0871eb3 Latest Latest
Warning

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

Go to latest
Published: Feb 4, 2021 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func New

func New(host, dbname, user, pass string, port uint16)

New is for create instance

Types

type GR

type GR struct {
	DB         *gorp.DbMap
	ServerInfo //embeded
}

GR is for database information and gorp instance

func GetDB

func GetDB() *GR

GetDB is to get instance. singleton architecture

func (*GR) Close

func (gr *GR) Close()

Close is to close connection

func (*GR) Connection

func (gr *GR) Connection() (*sql.DB, error)

Connection is to connect to MySQL server

type ServerInfo

type ServerInfo struct {
	// contains filtered or unexported fields
}

ServerInfo is for database information

Jump to

Keyboard shortcuts

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