db

package
v0.0.0-...-1d32ba8 Latest Latest
Warning

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

Go to latest
Published: Apr 25, 2024 License: Apache-2.0 Imports: 15 Imported by: 0

Documentation

Index

Constants

View Source
const LatestMigrationFile = "./db/migrations.latest"

Variables

View Source
var DB *gorm.DB

Functions

func Close

func Close() error

Close closes global database connection, DB

func Connect

func Connect() error

Connect initializes global database connection, DB

func GetUrl

func GetUrl() string

GetUrl Get database config and return url

func MigrateDB

func MigrateDB(dbURL string, direction string, steps ...int) error

MigrateDB runs migrations up or down with amount to run. Omit "steps" to run all migrations.

Types

This section is empty.

Jump to

Keyboard shortcuts

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