notice_response.go 722 B

12345678910111213141516171819
  1. package pgproto3
  2. type NoticeResponse ErrorResponse
  3. // Backend identifies this message as sendable by the PostgreSQL backend.
  4. func (*NoticeResponse) Backend() {}
  5. // Decode decodes src into dst. src must contain the complete message with the exception of the initial 1 byte message
  6. // type identifier and 4 byte message length.
  7. func (dst *NoticeResponse) Decode(src []byte) error {
  8. return (*ErrorResponse)(dst).Decode(src)
  9. }
  10. // Encode encodes src into dst. dst will include the 1 byte message type identifier and the 4 byte message length.
  11. func (src *NoticeResponse) Encode(dst []byte) ([]byte, error) {
  12. dst, sp := beginMessage(dst, 'N')
  13. dst = (*ErrorResponse)(src).appendFields(dst)
  14. return finishMessage(dst, sp)
  15. }