Versions in this module Expand all Collapse all v5 v5.5.3 Jan 15, 2024 v5.5.2 Jan 15, 2024 Changes in this version + const AuthTypeCleartextPassword + const AuthTypeGSS + const AuthTypeGSSCont + const AuthTypeMD5Password + const AuthTypeOk + const AuthTypeSASL + const AuthTypeSASLContinue + const AuthTypeSASLFinal + const AuthTypeSCMCreds + const AuthTypeSSPI + const BinaryFormat + const ProtocolVersionNumber + const TextFormat + type AuthenticationCleartextPassword struct + func (*AuthenticationCleartextPassword) AuthenticationResponse() + func (*AuthenticationCleartextPassword) Backend() + func (dst *AuthenticationCleartextPassword) Decode(src []byte) error + func (src *AuthenticationCleartextPassword) Encode(dst []byte) []byte + func (src AuthenticationCleartextPassword) MarshalJSON() ([]byte, error) + type AuthenticationGSS struct + func (a *AuthenticationGSS) AuthenticationResponse() + func (a *AuthenticationGSS) Backend() + func (a *AuthenticationGSS) Decode(src []byte) error + func (a *AuthenticationGSS) Encode(dst []byte) []byte + func (a *AuthenticationGSS) MarshalJSON() ([]byte, error) + func (a *AuthenticationGSS) UnmarshalJSON(data []byte) error + type AuthenticationGSSContinue struct + Data []byte + func (a *AuthenticationGSSContinue) AuthenticationResponse() + func (a *AuthenticationGSSContinue) Backend() + func (a *AuthenticationGSSContinue) Decode(src []byte) error + func (a *AuthenticationGSSContinue) Encode(dst []byte) []byte + func (a *AuthenticationGSSContinue) MarshalJSON() ([]byte, error) + func (a *AuthenticationGSSContinue) UnmarshalJSON(data []byte) error + type AuthenticationMD5Password struct + Salt [4]byte + func (*AuthenticationMD5Password) AuthenticationResponse() + func (*AuthenticationMD5Password) Backend() + func (dst *AuthenticationMD5Password) Decode(src []byte) error + func (dst *AuthenticationMD5Password) UnmarshalJSON(data []byte) error + func (src *AuthenticationMD5Password) Encode(dst []byte) []byte + func (src AuthenticationMD5Password) MarshalJSON() ([]byte, error) + type AuthenticationOk struct + func (*AuthenticationOk) AuthenticationResponse() + func (*AuthenticationOk) Backend() + func (dst *AuthenticationOk) Decode(src []byte) error + func (src *AuthenticationOk) Encode(dst []byte) []byte + func (src AuthenticationOk) MarshalJSON() ([]byte, error) + type AuthenticationResponseMessage interface + AuthenticationResponse func() + type AuthenticationSASL struct + AuthMechanisms []string + func (*AuthenticationSASL) AuthenticationResponse() + func (*AuthenticationSASL) Backend() + func (dst *AuthenticationSASL) Decode(src []byte) error + func (src *AuthenticationSASL) Encode(dst []byte) []byte + func (src AuthenticationSASL) MarshalJSON() ([]byte, error) + type AuthenticationSASLContinue struct + Data []byte + func (*AuthenticationSASLContinue) AuthenticationResponse() + func (*AuthenticationSASLContinue) Backend() + func (dst *AuthenticationSASLContinue) Decode(src []byte) error + func (dst *AuthenticationSASLContinue) UnmarshalJSON(data []byte) error + func (src *AuthenticationSASLContinue) Encode(dst []byte) []byte + func (src AuthenticationSASLContinue) MarshalJSON() ([]byte, error) + type AuthenticationSASLFinal struct + Data []byte + func (*AuthenticationSASLFinal) AuthenticationResponse() + func (*AuthenticationSASLFinal) Backend() + func (dst *AuthenticationSASLFinal) Decode(src []byte) error + func (dst *AuthenticationSASLFinal) UnmarshalJSON(data []byte) error + func (src *AuthenticationSASLFinal) Encode(dst []byte) []byte + func (src AuthenticationSASLFinal) MarshalJSON() ([]byte, error) + type Backend struct + func NewBackend(r io.Reader, w io.Writer) *Backend + func (b *Backend) Flush() error + func (b *Backend) Receive() (FrontendMessage, error) + func (b *Backend) ReceiveStartupMessage() (FrontendMessage, error) + func (b *Backend) Send(msg BackendMessage) + func (b *Backend) SetAuthType(authType uint32) error + func (b *Backend) SetMaxBodyLen(maxBodyLen int) + func (b *Backend) Trace(w io.Writer, options TracerOptions) + func (b *Backend) Untrace() + type BackendKeyData struct + ProcessID uint32 + SecretKey uint32 + func (*BackendKeyData) Backend() + func (dst *BackendKeyData) Decode(src []byte) error + func (src *BackendKeyData) Encode(dst []byte) []byte + func (src BackendKeyData) MarshalJSON() ([]byte, error) + type BackendMessage interface + Backend func() + type BigEndianBuf [8]byte + func (b BigEndianBuf) Int16(n int16) []byte + func (b BigEndianBuf) Int32(n int32) []byte + func (b BigEndianBuf) Int64(n int64) []byte + func (b BigEndianBuf) Uint16(n uint16) []byte + func (b BigEndianBuf) Uint32(n uint32) []byte + type Bind struct + DestinationPortal string + ParameterFormatCodes []int16 + Parameters [][]byte + PreparedStatement string + ResultFormatCodes []int16 + func (*Bind) Frontend() + func (dst *Bind) Decode(src []byte) error + func (dst *Bind) UnmarshalJSON(data []byte) error + func (src *Bind) Encode(dst []byte) []byte + func (src Bind) MarshalJSON() ([]byte, error) + type BindComplete struct + func (*BindComplete) Backend() + func (dst *BindComplete) Decode(src []byte) error + func (src *BindComplete) Encode(dst []byte) []byte + func (src BindComplete) MarshalJSON() ([]byte, error) + type CancelRequest struct + ProcessID uint32 + SecretKey uint32 + func (*CancelRequest) Frontend() + func (dst *CancelRequest) Decode(src []byte) error + func (src *CancelRequest) Encode(dst []byte) []byte + func (src CancelRequest) MarshalJSON() ([]byte, error) + type Close struct + Name string + ObjectType byte + func (*Close) Frontend() + func (dst *Close) Decode(src []byte) error + func (dst *Close) UnmarshalJSON(data []byte) error + func (src *Close) Encode(dst []byte) []byte + func (src Close) MarshalJSON() ([]byte, error) + type CloseComplete struct + func (*CloseComplete) Backend() + func (dst *CloseComplete) Decode(src []byte) error + func (src *CloseComplete) Encode(dst []byte) []byte + func (src CloseComplete) MarshalJSON() ([]byte, error) + type CommandComplete struct + CommandTag []byte + func (*CommandComplete) Backend() + func (dst *CommandComplete) Decode(src []byte) error + func (dst *CommandComplete) UnmarshalJSON(data []byte) error + func (src *CommandComplete) Encode(dst []byte) []byte + func (src CommandComplete) MarshalJSON() ([]byte, error) + type CopyBothResponse struct + ColumnFormatCodes []uint16 + OverallFormat byte + func (*CopyBothResponse) Backend() + func (dst *CopyBothResponse) Decode(src []byte) error + func (dst *CopyBothResponse) UnmarshalJSON(data []byte) error + func (src *CopyBothResponse) Encode(dst []byte) []byte + func (src CopyBothResponse) MarshalJSON() ([]byte, error) + type CopyData struct + Data []byte + func (*CopyData) Backend() + func (*CopyData) Frontend() + func (dst *CopyData) Decode(src []byte) error + func (dst *CopyData) UnmarshalJSON(data []byte) error + func (src *CopyData) Encode(dst []byte) []byte + func (src CopyData) MarshalJSON() ([]byte, error) + type CopyDone struct + func (*CopyDone) Backend() + func (*CopyDone) Frontend() + func (dst *CopyDone) Decode(src []byte) error + func (src *CopyDone) Encode(dst []byte) []byte + func (src CopyDone) MarshalJSON() ([]byte, error) + type CopyFail struct + Message string + func (*CopyFail) Frontend() + func (dst *CopyFail) Decode(src []byte) error + func (src *CopyFail) Encode(dst []byte) []byte + func (src CopyFail) MarshalJSON() ([]byte, error) + type CopyInResponse struct + ColumnFormatCodes []uint16 + OverallFormat byte + func (*CopyInResponse) Backend() + func (dst *CopyInResponse) Decode(src []byte) error + func (dst *CopyInResponse) UnmarshalJSON(data []byte) error + func (src *CopyInResponse) Encode(dst []byte) []byte + func (src CopyInResponse) MarshalJSON() ([]byte, error) + type CopyOutResponse struct + ColumnFormatCodes []uint16 + OverallFormat byte + func (*CopyOutResponse) Backend() + func (dst *CopyOutResponse) Decode(src []byte) error + func (dst *CopyOutResponse) UnmarshalJSON(data []byte) error + func (src *CopyOutResponse) Encode(dst []byte) []byte + func (src CopyOutResponse) MarshalJSON() ([]byte, error) + type DataRow struct + Values [][]byte + func (*DataRow) Backend() + func (dst *DataRow) Decode(src []byte) error + func (dst *DataRow) UnmarshalJSON(data []byte) error + func (src *DataRow) Encode(dst []byte) []byte + func (src DataRow) MarshalJSON() ([]byte, error) + type Describe struct + Name string + ObjectType byte + func (*Describe) Frontend() + func (dst *Describe) Decode(src []byte) error + func (dst *Describe) UnmarshalJSON(data []byte) error + func (src *Describe) Encode(dst []byte) []byte + func (src Describe) MarshalJSON() ([]byte, error) + type EmptyQueryResponse struct + func (*EmptyQueryResponse) Backend() + func (dst *EmptyQueryResponse) Decode(src []byte) error + func (src *EmptyQueryResponse) Encode(dst []byte) []byte + func (src EmptyQueryResponse) MarshalJSON() ([]byte, error) + type ErrorResponse struct + 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 + SeverityUnlocalized string + TableName string + UnknownFields map[byte]string + Where string + func (*ErrorResponse) Backend() + func (dst *ErrorResponse) Decode(src []byte) error + func (dst *ErrorResponse) UnmarshalJSON(data []byte) error + func (src *ErrorResponse) Encode(dst []byte) []byte + func (src ErrorResponse) MarshalJSON() ([]byte, error) + type ExceededMaxBodyLenErr struct + ActualBodyLen int + MaxExpectedBodyLen int + func (e *ExceededMaxBodyLenErr) Error() string + type Execute struct + MaxRows uint32 + Portal string + func (*Execute) Frontend() + func (dst *Execute) Decode(src []byte) error + func (src *Execute) Encode(dst []byte) []byte + func (src Execute) MarshalJSON() ([]byte, error) + type FieldDescription struct + DataTypeOID uint32 + DataTypeSize int16 + Format int16 + Name []byte + TableAttributeNumber uint16 + TableOID uint32 + TypeModifier int32 + func (fd FieldDescription) MarshalJSON() ([]byte, error) + type Flush struct + func (*Flush) Frontend() + func (dst *Flush) Decode(src []byte) error + func (src *Flush) Encode(dst []byte) []byte + func (src Flush) MarshalJSON() ([]byte, error) + type Frontend struct + func NewFrontend(r io.Reader, w io.Writer) *Frontend + func (f *Frontend) Flush() error + func (f *Frontend) GetAuthType() uint32 + func (f *Frontend) ReadBufferLen() int + func (f *Frontend) Receive() (BackendMessage, error) + func (f *Frontend) Send(msg FrontendMessage) + func (f *Frontend) SendBind(msg *Bind) + func (f *Frontend) SendClose(msg *Close) + func (f *Frontend) SendDescribe(msg *Describe) + func (f *Frontend) SendExecute(msg *Execute) + func (f *Frontend) SendParse(msg *Parse) + func (f *Frontend) SendQuery(msg *Query) + func (f *Frontend) SendSync(msg *Sync) + func (f *Frontend) SendUnbufferedEncodedCopyData(msg []byte) error + func (f *Frontend) Trace(w io.Writer, options TracerOptions) + func (f *Frontend) Untrace() + type FrontendMessage interface + Frontend func() + type FunctionCall struct + ArgFormatCodes []uint16 + Arguments [][]byte + Function uint32 + ResultFormatCode uint16 + func (*FunctionCall) Frontend() + func (dst *FunctionCall) Decode(src []byte) error + func (src *FunctionCall) Encode(dst []byte) []byte + type FunctionCallResponse struct + Result []byte + func (*FunctionCallResponse) Backend() + func (dst *FunctionCallResponse) Decode(src []byte) error + func (dst *FunctionCallResponse) UnmarshalJSON(data []byte) error + func (src *FunctionCallResponse) Encode(dst []byte) []byte + func (src FunctionCallResponse) MarshalJSON() ([]byte, error) + type GSSEncRequest struct + func (*GSSEncRequest) Frontend() + func (dst *GSSEncRequest) Decode(src []byte) error + func (src *GSSEncRequest) Encode(dst []byte) []byte + func (src GSSEncRequest) MarshalJSON() ([]byte, error) + type GSSResponse struct + Data []byte + func (g *GSSResponse) Decode(data []byte) error + func (g *GSSResponse) Encode(dst []byte) []byte + func (g *GSSResponse) Frontend() + func (g *GSSResponse) MarshalJSON() ([]byte, error) + func (g *GSSResponse) UnmarshalJSON(data []byte) error + type Message interface + Decode func(data []byte) error + Encode func(dst []byte) []byte + type NoData struct + func (*NoData) Backend() + func (dst *NoData) Decode(src []byte) error + func (src *NoData) Encode(dst []byte) []byte + func (src NoData) MarshalJSON() ([]byte, error) + type NoticeResponse ErrorResponse + func (*NoticeResponse) Backend() + func (dst *NoticeResponse) Decode(src []byte) error + func (src *NoticeResponse) Encode(dst []byte) []byte + type NotificationResponse struct + Channel string + PID uint32 + Payload string + func (*NotificationResponse) Backend() + func (dst *NotificationResponse) Decode(src []byte) error + func (src *NotificationResponse) Encode(dst []byte) []byte + func (src NotificationResponse) MarshalJSON() ([]byte, error) + type ParameterDescription struct + ParameterOIDs []uint32 + func (*ParameterDescription) Backend() + func (dst *ParameterDescription) Decode(src []byte) error + func (src *ParameterDescription) Encode(dst []byte) []byte + func (src ParameterDescription) MarshalJSON() ([]byte, error) + type ParameterStatus struct + Name string + Value string + func (*ParameterStatus) Backend() + func (dst *ParameterStatus) Decode(src []byte) error + func (ps ParameterStatus) MarshalJSON() ([]byte, error) + func (src *ParameterStatus) Encode(dst []byte) []byte + type Parse struct + Name string + ParameterOIDs []uint32 + Query string + func (*Parse) Frontend() + func (dst *Parse) Decode(src []byte) error + func (src *Parse) Encode(dst []byte) []byte + func (src Parse) MarshalJSON() ([]byte, error) + type ParseComplete struct + func (*ParseComplete) Backend() + func (dst *ParseComplete) Decode(src []byte) error + func (src *ParseComplete) Encode(dst []byte) []byte + func (src ParseComplete) MarshalJSON() ([]byte, error) + type PasswordMessage struct + Password string + func (*PasswordMessage) Frontend() + func (*PasswordMessage) InitialResponse() + func (dst *PasswordMessage) Decode(src []byte) error + func (src *PasswordMessage) Encode(dst []byte) []byte + func (src PasswordMessage) MarshalJSON() ([]byte, error) + type PortalSuspended struct + func (*PortalSuspended) Backend() + func (dst *PortalSuspended) Decode(src []byte) error + func (src *PortalSuspended) Encode(dst []byte) []byte + func (src PortalSuspended) MarshalJSON() ([]byte, error) + type Query struct + String string + func (*Query) Frontend() + func (dst *Query) Decode(src []byte) error + func (src *Query) Encode(dst []byte) []byte + func (src Query) MarshalJSON() ([]byte, error) + type ReadyForQuery struct + TxStatus byte + func (*ReadyForQuery) Backend() + func (dst *ReadyForQuery) Decode(src []byte) error + func (dst *ReadyForQuery) UnmarshalJSON(data []byte) error + func (src *ReadyForQuery) Encode(dst []byte) []byte + func (src ReadyForQuery) MarshalJSON() ([]byte, error) + type RowDescription struct + Fields []FieldDescription + func (*RowDescription) Backend() + func (dst *RowDescription) Decode(src []byte) error + func (dst *RowDescription) UnmarshalJSON(data []byte) error + func (src *RowDescription) Encode(dst []byte) []byte + func (src RowDescription) MarshalJSON() ([]byte, error) + type SASLInitialResponse struct + AuthMechanism string + Data []byte + func (*SASLInitialResponse) Frontend() + func (dst *SASLInitialResponse) Decode(src []byte) error + func (dst *SASLInitialResponse) UnmarshalJSON(data []byte) error + func (src *SASLInitialResponse) Encode(dst []byte) []byte + func (src SASLInitialResponse) MarshalJSON() ([]byte, error) + type SASLResponse struct + Data []byte + func (*SASLResponse) Frontend() + func (dst *SASLResponse) Decode(src []byte) error + func (dst *SASLResponse) UnmarshalJSON(data []byte) error + func (src *SASLResponse) Encode(dst []byte) []byte + func (src SASLResponse) MarshalJSON() ([]byte, error) + type SSLRequest struct + func (*SSLRequest) Frontend() + func (dst *SSLRequest) Decode(src []byte) error + func (src *SSLRequest) Encode(dst []byte) []byte + func (src SSLRequest) MarshalJSON() ([]byte, error) + type StartupMessage struct + Parameters map[string]string + ProtocolVersion uint32 + func (*StartupMessage) Frontend() + func (dst *StartupMessage) Decode(src []byte) error + func (src *StartupMessage) Encode(dst []byte) []byte + func (src StartupMessage) MarshalJSON() ([]byte, error) + type Sync struct + func (*Sync) Frontend() + func (dst *Sync) Decode(src []byte) error + func (src *Sync) Encode(dst []byte) []byte + func (src Sync) MarshalJSON() ([]byte, error) + type Terminate struct + func (*Terminate) Frontend() + func (dst *Terminate) Decode(src []byte) error + func (src *Terminate) Encode(dst []byte) []byte + func (src Terminate) MarshalJSON() ([]byte, error) + type TracerOptions struct + RegressMode bool + SuppressTimestamps bool