Source File
authentication_ok.go
Belonging Package
github.com/jackc/pgx/v5/pgproto3
package pgproto3import ()// AuthenticationOk is a message sent from the backend indicating that authentication was successful.type AuthenticationOk struct{}// Backend identifies this message as sendable by the PostgreSQL backend.func (*AuthenticationOk) () {}// Backend identifies this message as an authentication response.func (*AuthenticationOk) () {}// Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message// type identifier and 4 byte message length.func ( *AuthenticationOk) ( []byte) error {if len() != 4 {return errors.New("bad authentication message size")}:= binary.BigEndian.Uint32()if != AuthTypeOk {return errors.New("bad auth type")}return nil}// Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.func ( *AuthenticationOk) ( []byte) ([]byte, error) {, := beginMessage(, 'R')= pgio.AppendUint32(, AuthTypeOk)return finishMessage(, )}// MarshalJSON implements encoding/json.Marshaler.func ( AuthenticationOk) () ([]byte, error) {return json.Marshal(struct {string}{: "AuthenticationOK",})}
The pages are generated with Golds v0.7.6. (GOOS=linux GOARCH=amd64)