@@ -34,6 +34,7 @@ type Frontend struct {
|
|||||||
parseComplete ParseComplete
|
parseComplete ParseComplete
|
||||||
readyForQuery ReadyForQuery
|
readyForQuery ReadyForQuery
|
||||||
rowDescription RowDescription
|
rowDescription RowDescription
|
||||||
|
portalSuspended PortalSuspended
|
||||||
|
|
||||||
bodyLen int
|
bodyLen int
|
||||||
msgType byte
|
msgType byte
|
||||||
@@ -95,6 +96,8 @@ func (b *Frontend) Receive() (BackendMessage, error) {
|
|||||||
msg = &b.noticeResponse
|
msg = &b.noticeResponse
|
||||||
case 'R':
|
case 'R':
|
||||||
msg = &b.authentication
|
msg = &b.authentication
|
||||||
|
case 's':
|
||||||
|
msg = &b.portalSuspended
|
||||||
case 'S':
|
case 'S':
|
||||||
msg = &b.parameterStatus
|
msg = &b.parameterStatus
|
||||||
case 't':
|
case 't':
|
||||||
|
|||||||
@@ -0,0 +1,29 @@
|
|||||||
|
package pgproto3
|
||||||
|
|
||||||
|
import (
|
||||||
|
"encoding/json"
|
||||||
|
)
|
||||||
|
|
||||||
|
type PortalSuspended struct{}
|
||||||
|
|
||||||
|
func (*PortalSuspended) Backend() {}
|
||||||
|
|
||||||
|
func (dst *PortalSuspended) Decode(src []byte) error {
|
||||||
|
if len(src) != 0 {
|
||||||
|
return &invalidMessageLenErr{messageType: "PortalSuspended", expectedLen: 0, actualLen: len(src)}
|
||||||
|
}
|
||||||
|
|
||||||
|
return nil
|
||||||
|
}
|
||||||
|
|
||||||
|
func (src *PortalSuspended) Encode(dst []byte) []byte {
|
||||||
|
return append(dst, 's', 0, 0, 0, 4)
|
||||||
|
}
|
||||||
|
|
||||||
|
func (src *PortalSuspended) MarshalJSON() ([]byte, error) {
|
||||||
|
return json.Marshal(struct {
|
||||||
|
Type string
|
||||||
|
}{
|
||||||
|
Type: "PortalSuspended",
|
||||||
|
})
|
||||||
|
}
|
||||||
Reference in New Issue
Block a user