Help us shape the future of Go! Take the 2026 Go Developer Survey

mydburl

package module
v0.2.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2023 License: MIT Imports: 9 Imported by: 0

README

mydburl

xo/dburl wrapper for encrypted connection to MySQL using TLS protocol.

Support sslCa, sslCert, sslKey query params.

mysql://username:password@hostname:port/dbmane?sslCa=path/to/ca.pem&sslCert=path/to/cert.pem&sslKey=path/to/key.pem

Documentation

Index

Constants

View Source
const (
	DefaultTlsKey = "mydburl"
)

Variables

This section is empty.

Functions

func Open

func Open(urlstr string) (*sql.DB, error)

Types

type URL

type URL struct {
	dburl.URL

	SslCa   string
	SslCert string
	SslKey  string
}

func Parse

func Parse(urlstr string) (*URL, error)

func (*URL) RegisterTlsConfig

func (u *URL) RegisterTlsConfig(k string) error

Jump to

Keyboard shortcuts

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