dbconn

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jul 3, 2023 License: Apache-2.0 Imports: 18 Imported by: 0

Documentation

Overview

Package dbconn provides a Factory that makes *sql.DB connections to MySQL.

Index

Constants

This section is empty.

Variables

View Source
var Repo = &repo{
	m: &sync.Map{},
}

Functions

func NewConnFactory

func NewConnFactory(awsConfig blip.AWSConfigFactory, modifyDB func(*sql.DB, string)) factory

NewConnFactory returns a blip.NewConnFactory that connects to MySQL. This is the only blip.NewConnFactor. It is created in Server.Defaults.

func ParseMyCnf

func ParseMyCnf(file string) (blip.ConfigMySQL, blip.ConfigTLS, error)

ParseMyCnf parses a MySQL my.cnf file. It only reads the "[client]" section, same as the mysql CLI.

func RedactedDSN

func RedactedDSN(dsn string) string

func Sockets

func Sockets() []string

Types

type CredentialFunc

type CredentialFunc func(context.Context) (Credentials, error)

type Credentials

type Credentials struct {
	Username string
	Password string
	TLS      blip.ConfigTLS
}

Jump to

Keyboard shortcuts

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