schema

package
v1.1.0 Latest Latest
Warning

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

Go to latest
Published: Jul 22, 2022 License: BSD-3-Clause Imports: 3 Imported by: 1

Documentation

Index

Constants

View Source
const (
	MySQLDialect  = "mysql"
	SQLiteDialect = "sqlite"
)

nolint: golint

Variables

View Source
var (
	ErrPoolNotFound = errors.New("pool not found")
)

nolint: golint

Functions

This section is empty.

Types

type ConfigInterface

type ConfigInterface interface {
	List() []ItemInterface
}

ConfigInterface interface of configs

type Connector

type Connector interface {
	Dialect() string
	Pool(string) (*sql.DB, error)
	Reconnect() error
	Close() error
}

Connector interface of connection

type ItemInterface

type ItemInterface interface {
	GetName() string
	GetDSN() string
	Setup(SetupInterface)
}

ItemInterface config item interface

type SetupInterface

type SetupInterface interface {
	SetMaxIdleConns(int)
	SetMaxOpenConns(int)
	SetConnMaxLifetime(time.Duration)
}

SetupInterface connections setup interface

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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