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