db

package
v0.0.0-...-27c9e6d Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Index

Constants

View Source
const (
	Postgres = iota + 1
	Mysql
)

Database driver enums.

Variables

This section is empty.

Functions

func RedisConnect

func RedisConnect(opt *redis.Options) (*redis.Client, error)

Types

type DB

type DB struct {
	Connection *sqlx.DB
	Driver     Driver
}

DB is a pool of zero or more underlying connections to the drone database.

func Connect

func Connect(driver, connStr string) (*DB, error)

Connect to a database and verify with a ping.

type Driver

type Driver int

Driver defines the database driver.

Directories

Path Synopsis
migrate

Jump to

Keyboard shortcuts

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