Skip to main content

Module endpoint

Module endpoint 

Source
Expand description

Secret-free request builders for Gingr endpoints used as source evidence.

Endpoint structs describe provider requests without performing network I/O. Callers can inspect the path and parameters, attach source provenance, and only then hand the request to transport code with credentials.

use gingr::endpoint::{Date, DateRange, LocationId, Request, Reservations};

let range = DateRange::new(Date::parse("2026-06-18")?, Date::parse("2026-06-19")?)?;
let request = Reservations::for_range(range)
    .location(LocationId::new(170))
    .build();
let parts = request.request_parts();

assert_eq!(parts.path(), "/api/v1/reservations");
assert!(parts.form_pairs().iter().any(|(key, value)| {
    key == "location_id" && value == "170"
}));
assert!(parts.form_pairs().iter().any(|(key, value)| {
    key == "start_date" && value == "2026-06-18"
}));

Re-exports§

pub use reservations::Reservations;

Modules§

catalog
Catalog request documentation for service surfaces whose DTOs are still provider gaps.
commerce_retail
Retail and commerce requests used to collect inventory, package, transaction, and invoice evidence.
labor_ops
Labor-operation requests used to collect timeclock evidence for manager review.
owners_animals
Owner and animal requests used to collect customer, pet, form, and care-info evidence.
reference_data
Reference-data requests for locations, veterinarians, immunization labels, and related lookups.
report_cards_files
Report-card file requests used to retrieve provider documents for later review.
reservations
Reservation requests used to collect occupancy, check-in, and service-demand evidence.

Structs§

AnimalId
Newtype identifier shared by Gingr endpoints that pass numeric provider IDs.
Date
Gingr endpoint date formatted as YYYY-MM-DD for provider query/form parameters.
DateRange
Inclusive Gingr date window, capped at the request range this crate explicitly validates.
FormId
Newtype identifier shared by Gingr endpoints that pass numeric provider IDs.
IsoDate
Gingr ISO-style date filter formatted as YYYY-MM-DD where endpoints use nested params.
Limit
Positive provider record limit used to bound Gingr list/search responses.
LocationId
Newtype identifier shared by Gingr endpoints that pass numeric provider IDs.
OwnerId
Newtype identifier shared by Gingr endpoints that pass numeric provider IDs.
Path
Static Gingr API path emitted by an endpoint descriptor.
ReferenceId
Newtype identifier shared by Gingr endpoints that pass numeric provider IDs.
ReservationId
Newtype identifier shared by Gingr endpoints that pass numeric provider IDs.
SpeciesId
Newtype identifier shared by Gingr endpoints that pass numeric provider IDs.

Enums§

Error
Errors raised when Gingr request inputs cannot be represented as safe endpoint parameters.
Method
HTTP methods used by typed Gingr endpoint descriptors.

Traits§

Request
Defines the behavior required from a request participant in the endpoint workflow.

Type Aliases§

Result
Result type returned by fallible endpoint operations.