database

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Apr 19, 2017 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CLIFlags

func CLIFlags() []cli.Flag

CLIFlags returns database configuration flags

func Connect

func Connect() (*gorm.DB, error)

Connect will open a new connection to the database. If there is an error when attempting to connect to the database, we will close the database connection here prior to returning.

func Health

func Health() error

Health will check make sure the database is reachable or return an error

Types

type Model

type Model struct {
	ID        uint      `gorm:"primary_key" json:"id,string"`
	CreatedAt time.Time `json:"created_at,string"`
	UpdatedAt time.Time `json:"updated_at,string"`
}

Model base ORM struct

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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