azuremysql

package
v0.43.0 Latest Latest
Warning

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

Go to latest
Published: May 15, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package azuremysql provides connections to Azure Database for MySQL. See https://docs.microsoft.com/en-us/azure/mysql.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Open

func Open(ctx context.Context, cp CertPoolProvider, params *Params) (*sql.DB, func(), error)

Open opens an encrypted connection to an Azure Database for MySql database.

Types

type CertFetcher

type CertFetcher = azuredb.AzureCertFetcher

CertFetcher is a default CertPoolProvider that can fetch CA certificates from any publicly accessible URI or File.

type CertPoolProvider

type CertPoolProvider = azuredb.CertPoolProvider

A CertPoolProvider obtains a certificate pool that contains the Azure CA certificate.

type Params

type Params struct {
	// ServerName is the MYSQL instance name without domain suffix. Example: gocloud
	ServerName string
	// User is the database user to connect as.
	User string
	// Password is the database user password to use.
	Password string
	// Database is the MYSQL database name to connect to.
	Database string
	// TraceOpts contains options for OpenCensus.
	TraceOpts []ocsql.TraceOption
}

Params specifies how to connect to an Azure Database for MySQL.

func (*Params) GetFQDN

func (p *Params) GetFQDN() string

GetFQDN constructs the FQDN for Azure Database for MySQL.

func (*Params) Validate

func (p *Params) Validate() error

Validate ensures all required parameters are set.

Jump to

Keyboard shortcuts

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