manager

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2022 License: MIT Imports: 1 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Register

func Register(b DSNParser)

Types

type DSN

type DSN struct {
	User     string            // Username
	Password string            // Password (requires User)
	Net      string            // Network type
	Addr     string            // Network address (requires Net)
	DBName   string            // Database name
	Params   map[string]string // Connection parameters
}

DSN ...

type DSNParser

type DSNParser interface {
	GetDialector(dsn string) gorm.Dialector
	ParseDSN(dsn string) (cfg *DSN, err error)
	Scheme() string
}

func Get

func Get(scheme string) DSNParser

Get returns the dsn builder registered with the given scheme.

If no builder is register with the scheme, nil will be returned.

Jump to

Keyboard shortcuts

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