Skip to main content

Module http

Module http 

Source
Expand description

JSON DTOs shared by the HTTP/JSON transport (server handlers and the reqwest client). The gRPC transport carries the same gonzalo-core types as JSON bytes, so both transports agree on serialization.

Structs§

DeleteBody
Body of DELETE /v1/records/{ns}/{col}/{id}. The key is addressed by the URL path; the body carries the OCC precondition and, optionally, a claimed deleter identity.
PurgeBody
Body of POST /v1/purge/{ns}/{col}/{id} (gonzalo#203). The key is addressed by the URL path. expected is required, because purge is always conditional on the current revision. The response is a DeleteOutcome.
PutBody
Body of PUT /v1/records/{ns}/{col}/{id}.
RawRecordBody
Response of GET /v1/raw/records/{ns}/{col}/{id} (gonzalo#203). Absence is 200 {"record": null}, never 404: a 404 from this route means the daemon predates replication reads, and the client must tell the two apart without guessing. PUT on the same path takes a PutBody and answers a PutOutcome.

Enums§

DeleteOutcome
Response of a DELETE: mirrors gonzalo_core::DeleteResult on the wire.
PutOutcome
Response of a PUT: mirrors gonzalo_core::PutResult on the wire.