Versions in this module Expand all Collapse all v0 v0.22.0 Aug 5, 2026 v0.21.0 Aug 5, 2026 Changes in this version + const SSLModeAllow + const SSLModeDisable + const SSLModePrefer + const SSLModeRequire + const SSLModeVerifyCA + const SSLModeVerifyFull + var ErrMySQLNoAttempt = errors.New("mysql: ssl_mode produced no connection attempt") + var ErrOracleConnectorShape = errors.New("go-ora connector does not expose a dialer hook") + var ErrPostgresAuthFailed = errors.New("upstream authentication failed") + var ErrPostgresSSLResponse = errors.New("unexpected upstream SSL response byte") + var ErrPostgresTLSRequired = errors.New("upstream rejected TLS but ssl_mode requires it") + var ErrSCRAMMalformedMessage = errors.New("malformed SCRAM message from upstream") + var ErrSCRAMNoSupportedMechanism = errors.New("upstream offered no SCRAM mechanism we support") + var ErrSCRAMServerNonceMismatch = errors.New("SCRAM server nonce did not extend client nonce") + var ErrSCRAMServerSignature = errors.New("SCRAM server signature mismatch") + var ErrSCRAMUnexpectedMessage = errors.New("unexpected SASL message from upstream") + func ConnectOracle(ctx context.Context, dial DialFunc, cfg OracleConfig) (driver.Conn, error) + type Attempt struct + TLS *tls.Config + func (a Attempt) Encrypted() bool + type DialFunc func(ctx context.Context) (net.Conn, error) + type MySQLConfig struct + Database string + Host string + Password string + Port int + ProgramName string + SSLMode string + Username string + type MySQLUpstream struct + Conn *gomysqlclient.Conn + TLS bool + func ConnectMySQL(ctx context.Context, dial DialFunc, cfg MySQLConfig) (*MySQLUpstream, error) + func (u *MySQLUpstream) Close() error + type OracleConfig struct + Host string + Password string + Port int + ProgramName string + SSLMode string + ServiceName string + Username string + type Plan struct + Attempts []Attempt + Mode string + func PlanFor(mode, host string) Plan + func (p Plan) AllowsPlaintext() bool + func (p Plan) OffersTLS() bool + func (p Plan) PrefersTLS() bool + func (p Plan) RequiresTLS() bool + func (p Plan) TLSConfig() *tls.Config + type PostgresAuthError struct + Response *pgproto3.ErrorResponse + func (e *PostgresAuthError) Error() string + func (e *PostgresAuthError) Unwrap() error + type PostgresConfig struct + ApplicationName string + Database string + Host string + Password string + SSLMode string + Username string + type PostgresUpstream struct + BackendKeyData *pgproto3.BackendKeyData + Conn net.Conn + Frontend *pgproto3.Frontend + ParameterStatuses []*pgproto3.ParameterStatus + ReadyForQuery *pgproto3.ReadyForQuery + TLS bool + func ConnectPostgres(ctx context.Context, dial DialFunc, cfg PostgresConfig, logger *slog.Logger) (*PostgresUpstream, error) + func (u *PostgresUpstream) Close() error