Add missing GSSEncRequest
This commit is contained in:
+8
-1
@@ -19,6 +19,7 @@ type Backend struct {
|
||||
describe Describe
|
||||
execute Execute
|
||||
flush Flush
|
||||
gssEncRequest GSSEncRequest
|
||||
parse Parse
|
||||
passwordMessage PasswordMessage
|
||||
query Query
|
||||
@@ -45,7 +46,7 @@ func (b *Backend) Send(msg BackendMessage) error {
|
||||
|
||||
// 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, or CancelRequest.
|
||||
// will return either a StartupMessage, SSLRequest, GSSEncRequest, or CancelRequest.
|
||||
func (b *Backend) ReceiveStartupMessage() (FrontendMessage, error) {
|
||||
buf, err := b.cr.Next(4)
|
||||
if err != nil {
|
||||
@@ -79,6 +80,12 @@ func (b *Backend) ReceiveStartupMessage() (FrontendMessage, error) {
|
||||
return nil, err
|
||||
}
|
||||
return &b.cancelRequest, nil
|
||||
case gssEncReqNumber:
|
||||
err = b.gssEncRequest.Decode(buf)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
return &b.gssEncRequest, nil
|
||||
default:
|
||||
return nil, fmt.Errorf("unknown startup message code: %d", code)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user