database

package
v0.0.0-...-efcb511 Latest Latest
Warning

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

Go to latest
Published: Sep 21, 2020 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

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

DB represents a DB connection that can be used to run SQL queries.

func New

func New(db *gorm.DB) *DB

New returns a new DB connection that wraps the given gorm.DB instance.

func OpenConnection

func OpenConnection(cfg *config.Config) (*DB, error)

OpenConnection creates a connection to the database

func (*DB) DB

func (db *DB) DB() *gorm.DB

DB returns the gorm.DB wrapped by this object.

Jump to

Keyboard shortcuts

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