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

sqlserver

package
v1.19.0 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2026 License: Apache-2.0 Imports: 8 Imported by: 1

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 and SchemaName are only used by the SQL Server state store, which manages its
	// own database/schema. The SQL Server binding relies entirely on the connection string instead.
	DatabaseName string `mapstructure:"databaseName" mapstructurealiases:"database" mdonly:"state"`
	SchemaName   string `mapstructure:"schemaName" mapstructurealiases:"schema" mdonly:"state"`
	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