Documentation
¶
Overview ¶
Package providers is the single source of truth for which database drivers GoForge supports: their canonical name (as stored in goforge.yaml), accepted aliases, human label, and an example DSN with CHANGE_* placeholders so a project's .env can be scaffolded without anyone having to look up the driver's connection string syntax.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Descriptor ¶
type Descriptor struct {
// Driver is the canonical name stored in goforge.yaml's database.driver
// and used internally once resolved (see Resolve).
Driver string
// Label is the human-readable name shown in CLI output.
Label string
// Aliases are other spellings --driver accepts for this Descriptor.
Aliases []string
// ExampleDSN is a template DSN with CHANGE_* placeholders, in the exact
// syntax this driver expects, so a generated .env is immediately
// editable without consulting external documentation.
ExampleDSN string
// VersionQuery returns the connected server's own version string.
VersionQuery string
// CurrentDatabaseQuery returns the name of the connected database.
CurrentDatabaseQuery string
}
Descriptor describes one supported database provider.
func Resolve ¶
func Resolve(driver string) (Descriptor, error)
Resolve normalizes a --driver/database.driver value (case-insensitively, accepting aliases) to its canonical Descriptor.
Click to show internal directories.
Click to hide internal directories.