storage

package
v0.0.0-...-5d951de Latest Latest
Warning

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

Go to latest
Published: Mar 14, 2024 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const FSPath = "live"

Variables

This section is empty.

Functions

This section is empty.

Types

type DB

type DB struct {
	*sqlx.DB
	// contains filtered or unexported fields
}

func NewDB

func NewDB(params DBParams) (DB, error)

func (*DB) Connect

func (db *DB) Connect() error

func (*DB) ConnectTo

func (db *DB) ConnectTo(driver string, dataSource string, retries int) error

type DBParams

type DBParams struct {
	Host, Port, User, Pass, Driver, Name string

	// SchemaFunc is a function that returns the database schema depending on the driver.
	SchemaFunc func(driver vsql.Driver) string

	// Migrations is a list of migrations to run when needed.
	Migrations []vsql.Migration
}

Jump to

Keyboard shortcuts

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