Documentation
¶
Index ¶
Constants ¶
View Source
const ( AuthTypeOk = 0 AuthTypeCleartextPassword = 3 AuthTypeMD5Password = 5 )
View Source
const CancelRequestCode = 80877102
View Source
const (
ProtocolVersionNumber = 196608 // 3.0
)
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Authentication ¶
func (*Authentication) Backend ¶
func (*Authentication) Backend()
func (*Authentication) Decode ¶
func (dst *Authentication) Decode(src []byte) error
func (*Authentication) Encode ¶
func (src *Authentication) Encode(dst []byte) []byte
type BackendKeyData ¶
func (*BackendKeyData) Backend ¶
func (*BackendKeyData) Backend()
func (*BackendKeyData) Decode ¶
func (dst *BackendKeyData) Decode(src []byte) error
func (*BackendKeyData) Encode ¶
func (src *BackendKeyData) Encode(dst []byte) []byte
func (*BackendKeyData) MarshalJSON ¶
func (src *BackendKeyData) MarshalJSON() ([]byte, error)
type BackendMessage ¶
type BackendMessage interface { Message Backend() // no-op method to distinguish frontend from backend methods }
type BigEndianBuf ¶
type BigEndianBuf [8]byte
func (BigEndianBuf) Int16 ¶
func (b BigEndianBuf) Int16(n int16) []byte
func (BigEndianBuf) Int32 ¶
func (b BigEndianBuf) Int32(n int32) []byte
func (BigEndianBuf) Int64 ¶
func (b BigEndianBuf) Int64(n int64) []byte
func (BigEndianBuf) Uint16 ¶
func (b BigEndianBuf) Uint16(n uint16) []byte
func (BigEndianBuf) Uint32 ¶
func (b BigEndianBuf) Uint32(n uint32) []byte
type CancelRequest ¶
func (*CancelRequest) Decode ¶
func (dst *CancelRequest) Decode(src []byte) error
func (*CancelRequest) Encode ¶
func (src *CancelRequest) Encode(dst []byte) []byte
Encode encodes src into dst. dst will include the 4 byte message length.
func (*CancelRequest) Frontend ¶
func (*CancelRequest) Frontend()
Frontend identifies this message as sendable by a PostgreSQL frontend.
func (CancelRequest) MarshalJSON ¶
func (src CancelRequest) MarshalJSON() ([]byte, error)
MarshalJSON implements encoding/json.Marshaler.
type ErrorResponse ¶
type ErrorResponse struct { Severity string Code string Message string Detail string Hint string Position int32 InternalPosition int32 InternalQuery string Where string SchemaName string TableName string ColumnName string DataTypeName string ConstraintName string File string Line int32 Routine string UnknownFields map[byte]string }
func (*ErrorResponse) Backend ¶
func (*ErrorResponse) Backend()
func (*ErrorResponse) Decode ¶
func (dst *ErrorResponse) Decode(src []byte) error
func (*ErrorResponse) Encode ¶
func (src *ErrorResponse) Encode(dst []byte) []byte
type FrontendMessage ¶
type FrontendMessage interface { Message Frontend() // no-op method to distinguish frontend from backend methods }
type Message ¶
type Message interface { // Decode is allowed and expected to retain a reference to data after // returning (unlike encoding.BinaryUnmarshaler). Decode(data []byte) error // Encode appends itself to dst and returns the new buffer. Encode(dst []byte) []byte }
Message is the interface implemented by an object that can decode and encode a particular PostgreSQL message.
type PasswordMessage ¶
type PasswordMessage struct {
Password string
}
func (*PasswordMessage) Decode ¶
func (dst *PasswordMessage) Decode(src []byte) error
func (*PasswordMessage) Encode ¶
func (src *PasswordMessage) Encode(dst []byte) []byte
func (*PasswordMessage) Frontend ¶
func (*PasswordMessage) Frontend()
func (*PasswordMessage) MarshalJSON ¶
func (src *PasswordMessage) MarshalJSON() ([]byte, error)
type SSLMessage ¶
type SSLMessage struct{}
func (*SSLMessage) Decode ¶
func (dst *SSLMessage) Decode(src []byte) error
func (*SSLMessage) Encode ¶
func (src *SSLMessage) Encode(dst []byte) []byte
func (*SSLMessage) Frontend ¶
func (*SSLMessage) Frontend()
func (*SSLMessage) MarshalJSON ¶
func (src *SSLMessage) MarshalJSON() ([]byte, error)
type StartupMessage ¶
func (*StartupMessage) Decode ¶
func (dst *StartupMessage) Decode(src []byte) error
func (*StartupMessage) Encode ¶
func (src *StartupMessage) Encode(dst []byte) []byte
func (*StartupMessage) Frontend ¶
func (*StartupMessage) Frontend()
func (*StartupMessage) MarshalJSON ¶
func (src *StartupMessage) MarshalJSON() ([]byte, error)
Click to show internal directories.
Click to hide internal directories.