database

package
v0.1.1 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2023 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 Database

type Database struct {
	Host                  string `yaml:"host"`
	User                  string `yaml:"user"`
	Password              string `yaml:"password"`
	Database              string `yaml:"database"`
	MaxLifetime           int    `yaml:"max_lifetime"`
	MinIdleConnections    int    `yaml:"min_idle_connections"`
	MaxOpenConnections    int    `yaml:"max_open_connections"`
	MaxTransactionRetries int    `yaml:"max_transaction_retries"`
}

func New

func New() *Database

func (*Database) Connect

func (c *Database) Connect() (db.Session, error)

type SQLiteDatabase

type SQLiteDatabase struct {
	Database string `yaml:"database"`
}

func NewSQLite

func NewSQLite() *SQLiteDatabase

func (*SQLiteDatabase) Connect

func (c *SQLiteDatabase) Connect() (db.Session, error)

Jump to

Keyboard shortcuts

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