postgresql

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2026 License: MIT Imports: 9 Imported by: ? modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Index

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 New added in v1.0.3

func New() *PostgreSQL

New creates a new PostgreSQL application layer.

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) Handshake added in v1.0.3

func (p *PostgreSQL) Handshake(ctx context.Context, start time.Time, conn net.Conn, host string, port int, cfg *greet.GreetConfig) (net.Conn, greet.LayerData, greet.LayerTiming, error)

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

Jump to

Keyboard shortcuts

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