postgresql

package
v1.0.2 Latest Latest
Warning

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

Go to latest
Published: Jun 19, 2026 License: MIT Imports: 11 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 (*PostgreSQL) DefaultPort

func (p *PostgreSQL) DefaultPort() int

func (*PostgreSQL) Description

func (p *PostgreSQL) Description() string

func (*PostgreSQL) Greet

func (p *PostgreSQL) Greet(ctx context.Context, host string, port int, opts ...greet.GreetOption) (*greet.GreetResult, error)

func (*PostgreSQL) Name

func (p *PostgreSQL) Name() string

func (*PostgreSQL) ParseFlags

func (p *PostgreSQL) ParseFlags(fs *flag.FlagSet) ([]greet.GreetOption, error)

func (*PostgreSQL) RegisterFlags

func (p *PostgreSQL) RegisterFlags(fs *flag.FlagSet)

func (*PostgreSQL) Transport

func (p *PostgreSQL) Transport() greet.Transport

type PostgreSQLConfig

type PostgreSQLConfig struct {
	SSLMode string // "prefer" (default) or "disable"
}

PostgreSQLConfig holds protocol-specific configuration for PostgreSQL.

type PostgreSQLResult

type PostgreSQLResult struct {
	SSLSupported bool
}

PostgreSQLResult holds the outcome of a PostgreSQL SSL probe.

Jump to

Keyboard shortcuts

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