Source File
parameter_description.go
Belonging Package
github.com/jackc/pgproto3/v2
package pgproto3
import (
)
type ParameterDescription struct {
ParameterOIDs []uint32
}
func (*ParameterDescription) () {}
func ( *ParameterDescription) ( []byte) error {
:= bytes.NewBuffer()
if .Len() < 2 {
return &invalidMessageFormatErr{messageType: "ParameterDescription"}
}
:= .Len() / 4
* = ParameterDescription{ParameterOIDs: make([]uint32, )}
for := 0; < ; ++ {
.ParameterOIDs[] = binary.BigEndian.Uint32(.Next(4))
}
return nil
}
func ( *ParameterDescription) ( []byte) []byte {
= append(, 't')
:= len()
= pgio.AppendInt32(, -1)
= pgio.AppendUint16(, uint16(len(.ParameterOIDs)))
for , := range .ParameterOIDs {
= pgio.AppendUint32(, )
}
pgio.SetInt32([:], int32(len([:])))
return
}
func ( ParameterDescription) () ([]byte, error) {
return json.Marshal(struct {
string
[]uint32
}{
: "ParameterDescription",
: .ParameterOIDs,
})
![]() |
The pages are generated with Golds v0.3.2-preview. (GOOS=darwin 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. |