gosmm

package module
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Sep 18, 2023 License: MIT Imports: 8 Imported by: 0

README

gossm

Golang Simple Migration Manager

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConnectDB

func ConnectDB(config DBConfig) (*sql.DB, error)

ConnectDB connects to the database based on the given DBConfig

func Migrate

func Migrate(db *sql.DB, config DBConfig) error

Types

type DBConfig

type DBConfig struct {
	Driver        string
	Host          string
	Port          int
	User          string
	Password      string
	DBName        string
	MigrationsDir string
}

DBConfig holds the database configuration information

func LoadConfig

func LoadConfig(configFilePath string) (*DBConfig, error)

LoadConfig loads the database configuration from a toml file

Jump to

Keyboard shortcuts

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