infra

package
v0.0.0-...-4809337 Latest Latest
Warning

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

Go to latest
Published: Jun 10, 2021 License: Unlicense Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func InitDB

func InitDB(db *sql.DB) error

Types

type Database

type Database struct {
	DSN string
}

func (*Database) Close

func (d *Database) Close(db *sql.DB) error

Close closes a database connection

func (*Database) Open

func (d *Database) Open() (*sql.DB, error)

Open open a database connection

type DatabaseHandler

type DatabaseHandler interface {
	Open() (*sql.DB, error)
	Close(db *sql.DB) error
}

Jump to

Keyboard shortcuts

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