Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DatabaseConnection ¶
DatabaseConnection DB_USER= DB_PASS= DB_ADDRESS=database.***.location.rds.amazomaws.com DB_NAME= DB_PORT= db, err := DatabaseConnection()
if err != nil { c.JSON(500, appErrors.ErrMeatdataMsg(err, appErrors.ServerError)) return } defer db.Close()
Types ¶
type ConfigList ¶
type ConfigList struct { DbDriverName string DbName string DbUserName string DbUserPassword string DbHost string DbPort string ServerPort string }
------------------------------------------------------
func NewDB ¶
func NewDB(file string) (*ConfigList, error)
func NewLocalDB ¶
func NewLocalDB(user, pass, dbName string) (*ConfigList, error)
func (*ConfigList) LocalDatabase ¶
func (c *ConfigList) LocalDatabase() (*gorm.DB, error)
func (*ConfigList) NewMakeDB ¶
func (c *ConfigList) NewMakeDB(tables ...interface{}) error
Click to show internal directories.
Click to hide internal directories.