mssql

package
v1.0.0 Latest Latest
Warning

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

Go to latest
Published: Jun 9, 2021 License: MPL-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Auth

type Auth struct {
	Server   string // Ex: "changeme.database.windows.net" or "localhost"
	Port     string // Default: "1433"
	Instance string // Default: ""
	Username string // Ex: "SA" (or not, we hope)
	Password string // Ex: "secret",
	Catalog  string // Ex: "databasename"
}

Auth is for the MSSQL Server connection details

func (*Auth) NewConnection

func (auth *Auth) NewConnection() (*sqlx.DB, error)

NewConnection returns a new MSSQL connection after some simple checks and explicitly setting some defaults

func (*Auth) SecretString

func (auth *Auth) SecretString() string

SecretString gives back the full, credentialed access string

func (*Auth) String

func (auth *Auth) String() string

String outputs a fairly safe version of the connection string

Jump to

Keyboard shortcuts

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