sqlserver

package
v1.13.1 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsLetterOrNumber

func IsLetterOrNumber(c rune) bool

func IsValidSQLName

func IsValidSQLName(s string) bool

Types

type SQLServerAuthMetadata

type SQLServerAuthMetadata struct {
	ConnectionString string `mapstructure:"connectionString" mapstructurealiases:"url"`
	DatabaseName     string `mapstructure:"databaseName" mapstructurealiases:"database"`
	SchemaName       string `mapstructure:"schemaName" mapstructurealiases:"schema"`
	UseAzureAD       bool   `mapstructure:"useAzureAD"`
	// contains filtered or unexported fields
}

SQLServerAuthMetadata contains the auth metadata for a SQL Server component.

func (*SQLServerAuthMetadata) GetConnector

func (m *SQLServerAuthMetadata) GetConnector(setDatabase bool) (*mssql.Connector, bool, error)

GetConnector returns the connector from the connection string or Azure AD. The returned connector can be used with sql.OpenDB.

func (*SQLServerAuthMetadata) Reset

func (m *SQLServerAuthMetadata) Reset()

Reset the object

func (*SQLServerAuthMetadata) Validate

func (m *SQLServerAuthMetadata) Validate(meta map[string]string) (err error)

Validate the auth metadata and returns an error if it's not valid.

Jump to

Keyboard shortcuts

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