configs

package
v0.0.0-...-c7ff7ed Latest Latest
Warning

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

Go to latest
Published: Sep 5, 2021 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func NewSQLite

func NewSQLite(defaults *SQLite) ifaces.SQLConnector

Types

type SQL

type SQL struct {
	DriverName         string `toml:"driverName,omitempty" json:"driverName,omitempty"`
	MaxOpenConnections int    `toml:"maxOpenConnections,omitempty" json:"maxOpenConnections,omitempty"`
	MigrationPath      string `toml:"migrationPath,omitempty" json:"migrationPath,omitempty"`
}

func (*SQL) Connect

func (config *SQL) Connect(dataSource string) (*sql.DB, func(), error)

func (*SQL) Migrate

func (config *SQL) Migrate(dataSource string) error

type SQLite

type SQLite struct {
	*SQL
	DataSource string `toml:"dataSource,omitempty" json:"dataSource,omitempty"`
}

func (*SQLite) DSN

func (config *SQLite) DSN() string

func (*SQLite) Driver

func (config *SQLite) Driver() string

func (*SQLite) IsSet

func (config *SQLite) IsSet() bool

Jump to

Keyboard shortcuts

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