Source File
gss_response.go
Belonging Package
github.com/jackc/pgx/v5/pgproto3
package pgproto3
import (
)
type GSSResponse struct {
Data []byte
}
// Frontend identifies this message as sendable by a PostgreSQL frontend.
func ( *GSSResponse) () {}
func ( *GSSResponse) ( []byte) error {
.Data =
return nil
}
func ( *GSSResponse) ( []byte) []byte {
= append(, 'p')
= pgio.AppendInt32(, int32(4+len(.Data)))
= append(, .Data...)
return
}
// MarshalJSON implements encoding/json.Marshaler.
func ( *GSSResponse) () ([]byte, error) {
return json.Marshal(struct {
string
[]byte
}{
: "GSSResponse",
: .Data,
})
}
// UnmarshalJSON implements encoding/json.Unmarshaler.
func ( *GSSResponse) ( []byte) error {
var struct {
[]byte
}
if := json.Unmarshal(, &); != nil {
return
}
.Data = .
return nil
}
![]() |
The pages are generated with Golds v0.6.7. (GOOS=linux 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. |