cloudsqlmssql

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: Jan 8, 2026 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const SourceKind string = "cloud-sql-mssql"

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	// Cloud SQL MSSQL configs
	Name      string         `yaml:"name" validate:"required"`
	Kind      string         `yaml:"kind" validate:"required"`
	Project   string         `yaml:"project" validate:"required"`
	Region    string         `yaml:"region" validate:"required"`
	Instance  string         `yaml:"instance" validate:"required"`
	IPAddress string         `yaml:"ipAddress"` // Deprecated: kept for backwards compatibility
	IPType    sources.IPType `yaml:"ipType" validate:"required"`
	User      string         `yaml:"user" validate:"required"`
	Password  string         `yaml:"password" validate:"required"`
	Database  string         `yaml:"database" validate:"required"`
}

func (Config) Initialize

func (r Config) Initialize(ctx context.Context, tracer trace.Tracer) (sources.Source, error)

func (Config) SourceConfigKind

func (r Config) SourceConfigKind() string

type Source

type Source struct {
	Config
	Db *sql.DB
}

func (*Source) MSSQLDB

func (s *Source) MSSQLDB() *sql.DB

func (*Source) RunSQL added in v0.25.0

func (s *Source) RunSQL(ctx context.Context, statement string, params []any) (any, error)

func (*Source) SourceKind

func (s *Source) SourceKind() string

func (*Source) ToConfig added in v0.20.0

func (s *Source) ToConfig() sources.SourceConfig

Jump to

Keyboard shortcuts

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