Documentation
¶
Overview ¶
Package connections resolves named commons-db connections, kept as typed Connection resources in the commons-db connection store, into database DSNs.
Index ¶
Constants ¶
View Source
const App = "sqlglot-go"
App names sqlglot's own connection layer, <config>/sqlglot-go/connections.
View Source
const KubeContextProperty = dbcontext.KubeContextProperty
KubeContextProperty selects the kubeconfig context used to read the connection's secret:// and configmap:// references.
View Source
const Prefix = "connection://"
Prefix marks a --dsn value as a named connection reference.
Variables ¶
View Source
var SQLTypes = []string{ models.ConnectionTypePostgres, models.ConnectionTypeMySQL, models.ConnectionTypeSQLServer, models.ConnectionTypeClickHouse, models.ConnectionTypeSQLite, }
SQLTypes are the connection types sqlglot can open.
Functions ¶
func DefaultDir ¶
func DefaultDir() string
DefaultDir is sqlglot's own layer: $XDG_CONFIG_HOME/sqlglot-go/connections, otherwise ~/.config/sqlglot-go/connections.
Types ¶
type ResolveOptions ¶
type ResolveOptions struct {
Dir string
Reference string
// Kubernetes is the client for references of a connection without a
// kubecontext property; one with that property uses its own context.
Kubernetes *dutyKubernetes.Client
}
Click to show internal directories.
Click to hide internal directories.