db

package
v0.0.0-...-f597de0 Latest Latest
Warning

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

Go to latest
Published: Jun 6, 2021 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ConnectionFactory

type ConnectionFactory struct{}

ConnectionFactory is a factory to create DB connections.

func (ConnectionFactory) Create

func (f ConnectionFactory) Create(params Parameters) (*sql.DB, func(), error)

Create a new database handle DB pool of database connections.

type Parameters

type Parameters struct {
	Username string `yaml:"username"`
	Password string `yaml:"password"`
	Name     string `yaml:"name"`
	Host     string `yaml:"host"`
	Port     int    `yaml:"port"`
}

Parameters hold the necessary parameters to connect to a database.

Jump to

Keyboard shortcuts

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