Documentation
¶
Index ¶
- Constants
- type PostgreSQL
- func (p *PostgreSQL) BaseTransport() greet.Transport
- func (p *PostgreSQL) DefaultPort() int
- func (p *PostgreSQL) Description() string
- func (p *PostgreSQL) Handshake(ctx context.Context, start time.Time, conn net.Conn, host string, port int, ...) (net.Conn, greet.LayerData, greet.LayerTiming, error)
- func (p *PostgreSQL) Name() string
- type PostgreSQLConfig
- type PostgreSQLResult
Constants ¶
View Source
const ( ErrPostgreSQLStartupTimeout greet.ErrorCode = "startup_timeout" ErrPostgreSQLSendFailed greet.ErrorCode = "send_failed" ErrPostgreSQLMalformedResponse greet.ErrorCode = "malformed_response" ErrPostgreSQLSSLRejected greet.ErrorCode = "ssl_rejected" )
View Source
const DefaultPostgreSQLPort = 5432
DefaultPostgreSQLPort is the well-known port for PostgreSQL.
View Source
const ProtocolName = "postgresql"
ProtocolName is the registered name for the PostgreSQL protocol.
View Source
const SSLRequestMagic = 80877103
SSLRequest magic number: Int32(8) + Int32(80877103) 8 = message length (including self) 80877103 = (1234 << 16) | 5679
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type PostgreSQL ¶
type PostgreSQL struct{}
PostgreSQL implements a PostgreSQL SSLRequest probe. It is stateless — all configuration is passed via GreetOption.
func (*PostgreSQL) BaseTransport ¶ added in v1.0.3
func (p *PostgreSQL) BaseTransport() greet.Transport
func (*PostgreSQL) DefaultPort ¶
func (p *PostgreSQL) DefaultPort() int
func (*PostgreSQL) Description ¶
func (p *PostgreSQL) Description() string
func (*PostgreSQL) Name ¶
func (p *PostgreSQL) Name() string
type PostgreSQLConfig ¶
type PostgreSQLConfig struct {
SSLMode string // "prefer" (default) or "disable"
}
PostgreSQLConfig holds protocol-specific configuration for PostgreSQL.
func (*PostgreSQLConfig) LayerConfigName ¶ added in v1.0.3
func (c *PostgreSQLConfig) LayerConfigName() string
type PostgreSQLResult ¶
type PostgreSQLResult struct {
SSLSupported bool
}
PostgreSQLResult holds the outcome of a PostgreSQL SSL probe.
func (*PostgreSQLResult) LayerDataName ¶ added in v1.0.3
func (r *PostgreSQLResult) LayerDataName() string
Click to show internal directories.
Click to hide internal directories.