resolve

package
v1.6.1 Latest Latest
Warning

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

Go to latest
Published: May 2, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package resolve maps connection aliases, URLs, and file paths to concrete driver connections. Separated from the driver package to avoid import cycles.

File layout:

  • resolve.go: top-level Resolve dispatch (alias / ad-hoc / config).
  • policy.go: write permission, credential validation helpers.
  • urlparse.go: generic host:port URL parser used by ad-hoc paths.
  • connect_pg.go / connect_mysql.go / connect_snowflake.go / connect_mssql.go / connect_file.go: per-driver Connect wiring.

Adding a new driver: add an entry to driver.Registry and a new connect_<driver>.go here.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Resolve

func Resolve(ctx context.Context, opts Opts) (driver.Connection, error)

Resolve resolves a connection alias, URL, or file path to a driver.Connection.

Types

type Opts

type Opts struct {
	Connection string
	Write      bool
	Timeout    int
}

Opts configures driver resolution.

Jump to

Keyboard shortcuts

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