writeBackendKeyData sends the backend key data (for cancel requests)
(w io.Writer, pid, secretKey int32)
| 231 | func WriteAuthCleartextPassword(w io.Writer) error { |
| 232 | data := make([]byte, 4) |
| 233 | binary.BigEndian.PutUint32(data, authCleartextPwd) |
| 234 | return WriteMessage(w, MsgAuth, data) |
| 235 | } |
| 236 | |
| 237 | // writeParameterStatus sends a parameter status message |
| 238 | func WriteParameterStatus(w io.Writer, name, value string) error { |
| 239 | data := []byte(name) |
| 240 | data = append(data, 0) |
| 241 | data = append(data, []byte(value)...) |