proto

package
v1.11.1 Latest Latest
Warning

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

Go to latest
Published: Jan 29, 2026 License: MIT Imports: 3 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ProtocolVersion30 = (3 << 16) | 0 //lint:ignore SA4016 x
	ProtocolVersion32 = (3 << 16) | 2 // PostgreSQL ≥18; not yet supported.
	CancelRequestCode = (1234 << 16) | 5678
	NegotiateSSLCode  = (1234 << 16) | 5679
	NegotiateGSSCode  = (1234 << 16) | 5680
)

Constants from pqcomm.h

View Source
const (
	Bind                = RequestCode('B')
	Close               = RequestCode('C')
	Describe            = RequestCode('D')
	Execute             = RequestCode('E')
	FunctionCall        = RequestCode('F')
	Flush               = RequestCode('H')
	Parse               = RequestCode('P')
	Query               = RequestCode('Q')
	Sync                = RequestCode('S')
	Terminate           = RequestCode('X')
	CopyFail            = RequestCode('f')
	GSSResponse         = RequestCode('p')
	PasswordMessage     = RequestCode('p')
	SASLInitialResponse = RequestCode('p')
	SASLResponse        = RequestCode('p')
	CopyDoneRequest     = RequestCode('c')
	CopyDataRequest     = RequestCode('d')
)

These are the request codes sent by the frontend.

View Source
const (
	ParseComplete            = ResponseCode('1')
	BindComplete             = ResponseCode('2')
	CloseComplete            = ResponseCode('3')
	NotificationResponse     = ResponseCode('A')
	CommandComplete          = ResponseCode('C')
	DataRow                  = ResponseCode('D')
	ErrorResponse            = ResponseCode('E')
	CopyInResponse           = ResponseCode('G')
	CopyOutResponse          = ResponseCode('H')
	EmptyQueryResponse       = ResponseCode('I')
	BackendKeyData           = ResponseCode('K')
	NoticeResponse           = ResponseCode('N')
	AuthenticationRequest    = ResponseCode('R')
	ParameterStatus          = ResponseCode('S')
	RowDescription           = ResponseCode('T')
	FunctionCallResponse     = ResponseCode('V')
	CopyBothResponse         = ResponseCode('W')
	ReadyForQuery            = ResponseCode('Z')
	NoData                   = ResponseCode('n')
	PortalSuspended          = ResponseCode('s')
	ParameterDescription     = ResponseCode('t')
	NegotiateProtocolVersion = ResponseCode('v')
	CopyDoneResponse         = ResponseCode('c')
	CopyDataResponse         = ResponseCode('d')
)

These are the response codes sent by the backend.

View Source
const (
	AuthReqOk       = AuthCode(0) // User is authenticated
	AuthReqKrb4     = AuthCode(1) // Kerberos V4. Not supported any more.
	AuthReqKrb5     = AuthCode(2) // Kerberos V5. Not supported any more.
	AuthReqPassword = AuthCode(3) // Password
	AuthReqCrypt    = AuthCode(4) // crypt password. Not supported any more.
	AuthReqMD5      = AuthCode(5) // md5 password

	AuthReqGSS      = AuthCode(7)  // GSSAPI without wrap()
	AuthReqGSSCont  = AuthCode(8)  // Continue GSS exchanges
	AuthReqSSPI     = AuthCode(9)  // SSPI negotiate without wrap()
	AuthReqSASL     = AuthCode(10) // Begin SASL authentication
	AuthReqSASLCont = AuthCode(11) // Continue SASL authentication
	AuthReqSASLFin  = AuthCode(12) // Final SASL message
)

These are the authentication request codes sent by the backend.

Constants from fe-connect.c

View Source
const MaxUint32 = math.MaxUint32

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthCode

type AuthCode int32

AuthCode are authentication request codes sent by the backend.

func (AuthCode) String

func (a AuthCode) String() string

type RequestCode

type RequestCode byte

RequestCode is a request codes sent by the frontend.

func (RequestCode) String

func (r RequestCode) String() string

type ResponseCode

type ResponseCode byte

ResponseCode is a response codes sent by the backend.

func (ResponseCode) String

func (r ResponseCode) String() string

Jump to

Keyboard shortcuts

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