db

package
v0.0.0-...-cfa0e61 Latest Latest
Warning

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

Go to latest
Published: May 21, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrUnsupportedDBType = errors.New("unsupported db type")
)

Functions

func New

func New(options *Options) (db *gorm.DB, err error)

Types

type Options

type Options struct {
	Type                  Type
	Host                  string
	Username              string
	Password              string
	Database              string
	MaxIdleConnections    int
	MaxOpenConnections    int
	MaxConnectionLifeTime time.Duration
	// contains filtered or unexported fields
}

type Type

type Type int8
const (
	MySQL Type = iota
	MSSQL
)

Jump to

Keyboard shortcuts

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