package pgproto3
Import Path
github.com/jackc/pgproto3/v2 (on go.dev)
Dependency Relation
imports 10 packages, and imported by 2 packages
Involved Source Files
authentication_cleartext_password.go
authentication_md5_password.go
authentication_ok.go
authentication_sasl.go
authentication_sasl_continue.go
authentication_sasl_final.go
backend.go
backend_key_data.go
big_endian.go
bind.go
bind_complete.go
cancel_request.go
chunkreader.go
close.go
close_complete.go
command_complete.go
copy_both_response.go
copy_data.go
copy_done.go
copy_fail.go
copy_in_response.go
copy_out_response.go
data_row.go
describe.go
Package pgproto3 is a encoder and decoder of the PostgreSQL wire protocol version 3.
See https://www.postgresql.org/docs/current/protocol-message-formats.html for meanings of the different messages.
empty_query_response.go
error_response.go
execute.go
flush.go
frontend.go
function_call_response.go
gss_enc_request.go
no_data.go
notice_response.go
notification_response.go
parameter_description.go
parameter_status.go
parse.go
parse_complete.go
password_message.go
pgproto3.go
portal_suspended.go
query.go
ready_for_query.go
row_description.go
sasl_initial_response.go
sasl_response.go
ssl_request.go
startup_message.go
sync.go
terminate.go
Package-Level Type Names (total 55, in which 53 are exported)
AuthenticationCleartextPassword is a message sent from the backend indicating that a clear-text password is required.
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
*T : BackendMessage
*T : Message
AuthenticationMD5Password is a message sent from the backend indicating that an MD5 hashed password is required.
Salt [4]byte
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
*T : BackendMessage
*T : Message
AuthenticationOk is a message sent from the backend indicating that authentication was successful.
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
*T : BackendMessage
*T : Message
AuthenticationSASL is a message sent from the backend indicating that SASL authentication is required.
AuthMechanisms []string
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
*T : BackendMessage
*T : Message
AuthenticationSASLContinue is a message sent from the backend containing a SASL challenge.
Data []byte
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
*T : BackendMessage
*T : Message
func github.com/jackc/pgconn.(*PgConn).rxSASLContinue() (*AuthenticationSASLContinue, error)
AuthenticationSASLFinal is a message sent from the backend indicating a SASL authentication has completed.
Data []byte
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
*T : BackendMessage
*T : Message
func github.com/jackc/pgconn.(*PgConn).rxSASLFinal() (*AuthenticationSASLFinal, error)
Backend acts as a server for the PostgreSQL wire protocol version 3.
_close Close
Frontend message flyweights
bodyLen int
cancelRequest CancelRequest
copyFail CopyFail
cr ChunkReader
describe Describe
execute Execute
flush Flush
gssEncRequest GSSEncRequest
msgType byte
parse Parse
partialMsg bool
passwordMessage PasswordMessage
query Query
sslRequest SSLRequest
startupMessage StartupMessage
sync Sync
terminate Terminate
w io.Writer
Receive receives a message from the frontend. The returned message is only valid until the next call to Receive.
ReceiveStartupMessage receives the initial connection message. This method is used of the normal Receive method
because the initial connection message is "special" and does not include the message type as the first byte. This
will return either a StartupMessage, SSLRequest, GSSEncRequest, or CancelRequest.
Send sends a message to the frontend.
func NewBackend(cr ChunkReader, w io.Writer) *Backend
ProcessID uint32
SecretKey uint32
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
// no-op method to distinguish frontend from backend methods
Decode is allowed and expected to retain a reference to data after
returning (unlike encoding.BinaryUnmarshaler).
Encode appends itself to dst and returns the new buffer.
*AuthenticationCleartextPassword
*AuthenticationMD5Password
*AuthenticationOk
*AuthenticationSASL
*AuthenticationSASLContinue
*AuthenticationSASLFinal
*BackendKeyData
*BindComplete
*CloseComplete
*CommandComplete
*CopyBothResponse
*CopyData
*CopyDone
*CopyInResponse
*CopyOutResponse
*DataRow
*EmptyQueryResponse
*ErrorResponse
*FunctionCallResponse
*NoData
*NoticeResponse
*NotificationResponse
*ParameterDescription
*ParameterStatus
*ParseComplete
*PortalSuspended
*ReadyForQuery
*RowDescription
T : Message
func (*Frontend).Receive() (BackendMessage, error)
func github.com/jackc/pgconn.Frontend.Receive() (BackendMessage, error)
func github.com/jackc/pgconn.(*PgConn).ReceiveMessage(ctx context.Context) (BackendMessage, error)
func (*Frontend).findAuthenticationMessageType(src []byte) (BackendMessage, error)
func github.com/jackc/pgconn.(*MultiResultReader).receiveMessage() (BackendMessage, error)
func github.com/jackc/pgconn.(*PgConn).peekMessage() (BackendMessage, error)
func github.com/jackc/pgconn.(*PgConn).receiveMessage() (BackendMessage, error)
func github.com/jackc/pgconn.(*ResultReader).receiveMessage() (msg BackendMessage, err error)
func (*Backend).Send(msg BackendMessage) error
( T) Int16(n int16) []byte
( T) Int32(n int32) []byte
( T) Int64(n int64) []byte
( T) Uint16(n uint16) []byte
( T) Uint32(n uint32) []byte
DestinationPortal string
ParameterFormatCodes []int16
Parameters [][]byte
PreparedStatement string
ResultFormatCodes []int16
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
ProcessID uint32
SecretKey uint32
(*T) Decode(src []byte) error
Encode encodes src into dst. dst will include the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
ChunkReader is an interface to decouple github.com/jackc/chunkreader from this package.
Next returns buf filled with the next n bytes. If an error (including a partial read) occurs,
buf must be nil. Next must preserve any partially read data. Next must not reuse buf.
*github.com/jackc/chunkreader/v2.ChunkReader
func NewChunkReader(r io.Reader) ChunkReader
func NewBackend(cr ChunkReader, w io.Writer) *Backend
func NewFrontend(cr ChunkReader, w io.Writer) *Frontend
Name string
// 'S' = prepared statement, 'P' = portal
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
CommandTag []byte
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
ColumnFormatCodes []uint16
OverallFormat byte
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
Data []byte
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
Message string
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
ColumnFormatCodes []uint16
OverallFormat byte
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
ColumnFormatCodes []uint16
OverallFormat byte
(*T) Backend()
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
Values [][]byte
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
Name string
// 'S' = prepared statement, 'P' = portal
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
Code string
ColumnName string
ConstraintName string
DataTypeName string
Detail string
File string
Hint string
InternalPosition int32
InternalQuery string
Line int32
Message string
Position int32
Routine string
SchemaName string
Severity string
TableName string
UnknownFields map[byte]string
Where string
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
(*T) marshalBinary(typeByte byte) []byte
*T : BackendMessage
*T : Message
func github.com/jackc/pgconn.ErrorResponseToPgError(msg *ErrorResponse) *pgconn.PgError
MaxRows uint32
Portal string
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
DataTypeOID uint32
DataTypeSize int16
Format int16
Name []byte
TableAttributeNumber uint16
TableOID uint32
TypeModifier int32
MarshalJSON implements encoding/json.Marshaler.
T : encoding/json.Marshaler
func github.com/jackc/pgconn.(*ResultReader).FieldDescriptions() []FieldDescription
func github.com/jackc/pgx/v4.QueryFuncRow.FieldDescriptions() []FieldDescription
func github.com/jackc/pgx/v4.Rows.FieldDescriptions() []FieldDescription
func github.com/jackc/pgx/v4.ScanRow(connInfo *pgtype.ConnInfo, fieldDescriptions []FieldDescription, values [][]byte, dest ...interface{}) error
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
Frontend acts as a client for the PostgreSQL wire protocol version 3.
authenticationCleartextPassword AuthenticationCleartextPassword
authenticationMD5Password AuthenticationMD5Password
Backend message flyweights
authenticationSASL AuthenticationSASL
authenticationSASLContinue AuthenticationSASLContinue
authenticationSASLFinal AuthenticationSASLFinal
backendKeyData BackendKeyData
bindComplete BindComplete
bodyLen int
closeComplete CloseComplete
commandComplete CommandComplete
copyBothResponse CopyBothResponse
copyData CopyData
copyDone CopyDone
copyInResponse CopyInResponse
copyOutResponse CopyOutResponse
cr ChunkReader
dataRow DataRow
emptyQueryResponse EmptyQueryResponse
errorResponse ErrorResponse
functionCallResponse FunctionCallResponse
msgType byte
noData NoData
noticeResponse NoticeResponse
notificationResponse NotificationResponse
parameterDescription ParameterDescription
parameterStatus ParameterStatus
parseComplete ParseComplete
partialMsg bool
portalSuspended PortalSuspended
readyForQuery ReadyForQuery
rowDescription RowDescription
w io.Writer
Receive receives a message from the backend. The returned message is only valid until the next call to Receive.
Send sends a message to the backend.
(*T) findAuthenticationMessageType(src []byte) (BackendMessage, error)
*T : github.com/jackc/pgconn.Frontend
func NewFrontend(cr ChunkReader, w io.Writer) *Frontend
Decode is allowed and expected to retain a reference to data after
returning (unlike encoding.BinaryUnmarshaler).
Encode appends itself to dst and returns the new buffer.
// no-op method to distinguish frontend from backend methods
*Bind
*CancelRequest
*Close
*CopyData
*CopyDone
*CopyFail
*Describe
*Execute
*Flush
*GSSEncRequest
*Parse
*PasswordMessage
*Query
*SASLInitialResponse
*SASLResponse
*SSLRequest
*StartupMessage
*Sync
*Terminate
T : Message
func (*Backend).Receive() (FrontendMessage, error)
func (*Backend).ReceiveStartupMessage() (FrontendMessage, error)
func (*Frontend).Send(msg FrontendMessage) error
Result []byte
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
(*T) Decode(src []byte) error
Encode encodes src into dst. dst will include the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
Message is the interface implemented by an object that can decode and encode
a particular PostgreSQL message.
Decode is allowed and expected to retain a reference to data after
returning (unlike encoding.BinaryUnmarshaler).
Encode appends itself to dst and returns the new buffer.
*AuthenticationCleartextPassword
*AuthenticationMD5Password
*AuthenticationOk
*AuthenticationSASL
*AuthenticationSASLContinue
*AuthenticationSASLFinal
*BackendKeyData
BackendMessage (interface)
*Bind
*BindComplete
*CancelRequest
*Close
*CloseComplete
*CommandComplete
*CopyBothResponse
*CopyData
*CopyDone
*CopyFail
*CopyInResponse
*CopyOutResponse
*DataRow
*Describe
*EmptyQueryResponse
*ErrorResponse
*Execute
*Flush
FrontendMessage (interface)
*FunctionCallResponse
*GSSEncRequest
*NoData
*NoticeResponse
*NotificationResponse
*ParameterDescription
*ParameterStatus
*Parse
*ParseComplete
*PasswordMessage
*PortalSuspended
*Query
*ReadyForQuery
*RowDescription
*SASLInitialResponse
*SASLResponse
*SSLRequest
*StartupMessage
*Sync
*Terminate
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
Code string
ColumnName string
ConstraintName string
DataTypeName string
Detail string
File string
Hint string
InternalPosition int32
InternalQuery string
Line int32
Message string
Position int32
Routine string
SchemaName string
Severity string
TableName string
UnknownFields map[byte]string
Where string
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
*T : BackendMessage
*T : Message
func github.com/jackc/pgconn.noticeResponseToNotice(msg *NoticeResponse) *pgconn.Notice
Channel string
PID uint32
Payload string
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
ParameterOIDs []uint32
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
Name string
Value string
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
Name string
ParameterOIDs []uint32
Query string
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
Password string
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
String string
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
TxStatus byte
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
Fields []FieldDescription
Backend identifies this message as sendable by the PostgreSQL backend.
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
MarshalJSON implements encoding/json.Marshaler.
*T : BackendMessage
*T : Message
T : encoding/json.Marshaler
AuthMechanism string
Data []byte
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
Data []byte
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
(*T) Decode(src []byte) error
Encode encodes src into dst. dst will include the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
Parameters map[string]string
ProtocolVersion uint32
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
type identifier and 4 byte message length.
Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
Frontend identifies this message as sendable by a PostgreSQL frontend.
MarshalJSON implements encoding/json.Marshaler.
*T : FrontendMessage
*T : Message
T : encoding/json.Marshaler
Package-Level Functions (total 4, in which 3 are exported)
NewBackend creates a new Backend.
NewChunkReader creates and returns a new default ChunkReader.
NewFrontend creates a new Frontend.
Package-Level Constants (total 12, in which 9 are exported)
Authentication message type constants.
Authentication message type constants.
Authentication message type constants.
Authentication message type constants.
Authentication message type constants.
Authentication message type constants.
const BinaryFormat = 1 const ProtocolVersionNumber = 196608 // 3.0 const TextFormat = 0
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin GOARCH=amd64) Golds is a Go 101 project developed by Tapir Liu. PR and bug reports are welcome and can be submitted to the issue list. Please follow @Go100and1 (reachable from the left QR code) to get the latest news of Golds. |