pub struct HttpClient<T> { /* private fields */ }Expand description
A typed /agdx/* client over an injected Transport.
Binary KV keys are base64url-encoded into the path by the client, so raw user
bytes never enter a path segment. A namespace, fork id, or projection id argument, by contrast, is placed in the path verbatim, so the caller must
pass a path-safe identifier (no /, ?, or #). Fork ids are already
constrained by validate_fork_id.
Implementations§
Source§impl<T: Transport> HttpClient<T>
impl<T: Transport> HttpClient<T>
Sourcepub fn transport(&self) -> &T
pub fn transport(&self) -> &T
The underlying transport, for a caller that needs an escape hatch.
Sourcepub async fn capabilities(&self) -> Result<Capabilities, ClientError<T::Error>>
pub async fn capabilities(&self) -> Result<Capabilities, ClientError<T::Error>>
GET /agdx/capabilities: feature-detect before showing a view.
Sourcepub async fn query(
&self,
query: &Query,
) -> Result<QueryExecutionView, ClientError<T::Error>>
pub async fn query( &self, query: &Query, ) -> Result<QueryExecutionView, ClientError<T::Error>>
POST /agdx/query: submit a query and return its current execution view.
pub async fn query_page( &self, execution_id: QueryExecutionId, body: &QueryPageBody, ) -> Result<QueryResult, ClientError<T::Error>>
pub async fn query_status( &self, execution_id: QueryExecutionId, ) -> Result<QueryExecutionView, ClientError<T::Error>>
pub async fn cancel_query( &self, execution_id: QueryExecutionId, ) -> Result<QueryExecutionStatus, ClientError<T::Error>>
pub async fn list_destinations( &self, query: &DestinationListQuery, ) -> Result<DestinationPageView, ClientError<T::Error>>
pub async fn destination( &self, id: DestinationId, consistency: CheckpointReadConsistency, ) -> Result<Option<DestinationView>, ClientError<T::Error>>
pub async fn create_destination( &self, body: &DestinationMutationBody, ) -> Result<AcceptedOperationView, ClientError<T::Error>>
pub async fn enable_destination( &self, id: DestinationId, body: &DestinationMutationBody, ) -> Result<AcceptedOperationView, ClientError<T::Error>>
pub async fn disable_destination( &self, id: DestinationId, body: &DestinationMutationBody, ) -> Result<AcceptedOperationView, ClientError<T::Error>>
pub async fn destination_operation( &self, id: DestinationOperationId, ) -> Result<AcceptedOperationView, ClientError<T::Error>>
pub async fn destination_status( &self, id: DestinationId, consistency: CheckpointReadConsistency, ) -> Result<DestinationCheckpointStatus, ClientError<T::Error>>
pub async fn destination_checkpoint( &self, id: DestinationId, consistency: CheckpointReadConsistency, ) -> Result<DestinationCheckpointStatus, ClientError<T::Error>>
pub async fn destination_retention_gap( &self, id: DestinationId, consistency: CheckpointReadConsistency, ) -> Result<DestinationIssueView, ClientError<T::Error>>
pub async fn destination_prepared_attempt( &self, id: DestinationId, consistency: CheckpointReadConsistency, ) -> Result<DestinationIssueView, ClientError<T::Error>>
pub async fn query_routes( &self, query: &QueryRouteListQuery, ) -> Result<QueryRoutePageView, ClientError<T::Error>>
pub async fn destination_table( &self, id: DestinationId, ) -> Result<TableView, ClientError<T::Error>>
pub async fn destination_table_schema( &self, id: DestinationId, ) -> Result<TableSchemaView, ClientError<T::Error>>
pub async fn destination_current_snapshot( &self, id: DestinationId, ) -> Result<TableSnapshotView, ClientError<T::Error>>
pub async fn destination_snapshots( &self, id: DestinationId, query: &SnapshotListQuery, ) -> Result<SnapshotPageView, ClientError<T::Error>>
pub async fn destination_snapshot( &self, id: DestinationId, snapshot_id: i64, ) -> Result<TableSnapshotView, ClientError<T::Error>>
pub async fn destination_files( &self, id: DestinationId, query: &TableFileListQuery, ) -> Result<TableFilePageView, ClientError<T::Error>>
pub async fn destination_metrics( &self, id: DestinationId, ) -> Result<TableMetricsView, ClientError<T::Error>>
Sourcepub async fn list_projections(
&self,
filter: &ProjectionListQuery,
) -> Result<Vec<ProjectionInfo>, ClientError<T::Error>>
pub async fn list_projections( &self, filter: &ProjectionListQuery, ) -> Result<Vec<ProjectionInfo>, ClientError<T::Error>>
GET /agdx/projections: list projections and their bindings, optionally
filtered.
Sourcepub async fn list_schemas(
&self,
filter: &SchemaListQuery,
) -> Result<Vec<SchemaInfo>, ClientError<T::Error>>
pub async fn list_schemas( &self, filter: &SchemaListQuery, ) -> Result<Vec<SchemaInfo>, ClientError<T::Error>>
GET /agdx/schemas: list registered schemas, optionally filtered.
Sourcepub async fn register_schema(
&self,
source: SchemaSource,
name: Option<String>,
version: Option<u32>,
stream: Option<String>,
) -> Result<u32, ClientError<T::Error>>
pub async fn register_schema( &self, source: SchemaSource, name: Option<String>, version: Option<u32>, stream: Option<String>, ) -> Result<u32, ClientError<T::Error>>
POST /agdx/schemas: register a schema, get its allocated id. stream
names the stream whose registry allocates it, None the
deployment-wide registry.
Sourcepub async fn kv_get(
&self,
namespace: &str,
key: &[u8],
) -> Result<Option<KvValue>, ClientError<T::Error>>
pub async fn kv_get( &self, namespace: &str, key: &[u8], ) -> Result<Option<KvValue>, ClientError<T::Error>>
GET /agdx/kv/{namespace}/{key}: fetch one entry, or None on a 404.
The value rides the raw response body (no base64 inflation, symmetric with
kv_set), and the optional expiry rides the
KV_EXPIRES_AT_MICROS_HEADER response
header.
Sourcepub async fn kv_set(
&self,
namespace: &str,
key: &[u8],
value: &[u8],
expires_at_micros: Option<u64>,
) -> Result<(), ClientError<T::Error>>
pub async fn kv_set( &self, namespace: &str, key: &[u8], value: &[u8], expires_at_micros: Option<u64>, ) -> Result<(), ClientError<T::Error>>
PUT /agdx/kv/{namespace}/{key}: set a value, with an optional absolute
expiry (epoch microseconds).
Sourcepub async fn kv_set_as(
&self,
namespace: &str,
key: &[u8],
value: &[u8],
expires_at_micros: Option<u64>,
operation_id: NonZeroU128,
) -> Result<(), ClientError<T::Error>>
pub async fn kv_set_as( &self, namespace: &str, key: &[u8], value: &[u8], expires_at_micros: Option<u64>, operation_id: NonZeroU128, ) -> Result<(), ClientError<T::Error>>
kv_set under the caller’s operation_id. Re-send a
write whose outcome is unknown with the same id: the server answers the
recorded outcome instead of writing again.
Sourcepub async fn kv_cas(
&self,
namespace: &str,
key: &[u8],
value: &[u8],
expect: CasExpect,
expires_at_micros: Option<u64>,
) -> Result<u64, ClientError<T::Error>>
pub async fn kv_cas( &self, namespace: &str, key: &[u8], value: &[u8], expect: CasExpect, expires_at_micros: Option<u64>, ) -> Result<u64, ClientError<T::Error>>
PUT /agdx/kv/{namespace}/{key}/cas: a conditional write
(compare-and-swap). Applies value only if expect holds, returning the
new version on commit. A precondition miss surfaces as
ClientError::Api with ResultCode::Conflict (the response’s
ErrorBody.detail carries the current version). Backend-gated by the
kv_cas capability: a deployment that does not serve it answers
unsupported.
Sourcepub async fn kv_cas_as(
&self,
namespace: &str,
key: &[u8],
value: &[u8],
expect: CasExpect,
expires_at_micros: Option<u64>,
operation_id: NonZeroU128,
) -> Result<u64, ClientError<T::Error>>
pub async fn kv_cas_as( &self, namespace: &str, key: &[u8], value: &[u8], expect: CasExpect, expires_at_micros: Option<u64>, operation_id: NonZeroU128, ) -> Result<u64, ClientError<T::Error>>
kv_cas under the caller’s operation_id. A re-send
with the same id answers the recorded commit instead of a conflict
against the version the first attempt wrote.
Sourcepub async fn kv_delete(
&self,
namespace: &str,
key: &[u8],
) -> Result<bool, ClientError<T::Error>>
pub async fn kv_delete( &self, namespace: &str, key: &[u8], ) -> Result<bool, ClientError<T::Error>>
DELETE /agdx/kv/{namespace}/{key}: delete one entry, returning true if it existed.
Sourcepub async fn kv_delete_as(
&self,
namespace: &str,
key: &[u8],
operation_id: NonZeroU128,
) -> Result<bool, ClientError<T::Error>>
pub async fn kv_delete_as( &self, namespace: &str, key: &[u8], operation_id: NonZeroU128, ) -> Result<bool, ClientError<T::Error>>
kv_delete under the caller’s operation_id.
Sourcepub async fn kv_scan(
&self,
namespace: &str,
filter: &KvScanQuery,
) -> Result<KvPageView, ClientError<T::Error>>
pub async fn kv_scan( &self, namespace: &str, filter: &KvScanQuery, ) -> Result<KvPageView, ClientError<T::Error>>
GET /agdx/kv/{namespace}: scan a page of entries.
Sourcepub async fn create_fork(
&self,
body: &ForkCreateBody,
) -> Result<ForkInfo, ClientError<T::Error>>
pub async fn create_fork( &self, body: &ForkCreateBody, ) -> Result<ForkInfo, ClientError<T::Error>>
POST /agdx/forks: create a fork.
Sourcepub async fn create_fork_as(
&self,
body: &ForkCreateBody,
operation_id: NonZeroU128,
) -> Result<ForkInfo, ClientError<T::Error>>
pub async fn create_fork_as( &self, body: &ForkCreateBody, operation_id: NonZeroU128, ) -> Result<ForkInfo, ClientError<T::Error>>
create_fork under the caller’s operation_id.
Sourcepub async fn list_forks(&self) -> Result<Vec<ForkInfo>, ClientError<T::Error>>
pub async fn list_forks(&self) -> Result<Vec<ForkInfo>, ClientError<T::Error>>
GET /agdx/forks: list the caller’s forks.
Sourcepub async fn clients(
&self,
query: &ClientsQuery,
) -> Result<ClientMetadataListView, ClientError<T::Error>>
pub async fn clients( &self, query: &ClientsQuery, ) -> Result<ClientMetadataListView, ClientError<T::Error>>
GET /agdx/clients: one page of live connections with their advertised
metadata, filtered and paginated per query. Follow next_cursor as the
next after to page.
Sourcepub async fn list_sessions(
&self,
stream: &str,
query: &SessionsQuery,
) -> Result<SessionPage, ClientError<T::Error>>
pub async fn list_sessions( &self, stream: &str, query: &SessionsQuery, ) -> Result<SessionPage, ClientError<T::Error>>
GET /agdx/sessions/{stream}: one page of the stream’s sessions,
filtered and paged per query.
Sourcepub async fn session(
&self,
stream: &str,
id: ConversationId,
) -> Result<Option<SessionInfo>, ClientError<T::Error>>
pub async fn session( &self, stream: &str, id: ConversationId, ) -> Result<Option<SessionInfo>, ClientError<T::Error>>
GET /agdx/sessions/{stream}/{id}: one session’s summary, or None on
a 404.
Sourcepub async fn session_events(
&self,
stream: &str,
id: ConversationId,
query: &SessionEventsQuery,
) -> Result<SessionEventsPage, ClientError<T::Error>>
pub async fn session_events( &self, stream: &str, id: ConversationId, query: &SessionEventsQuery, ) -> Result<SessionEventsPage, ClientError<T::Error>>
GET /agdx/sessions/{stream}/{id}/events: one page of a session’s
events.
Sourcepub async fn session_state(
&self,
stream: &str,
id: ConversationId,
query: &SessionStateQuery,
) -> Result<SessionStateView, ClientError<T::Error>>
pub async fn session_state( &self, stream: &str, id: ConversationId, query: &SessionStateQuery, ) -> Result<SessionStateView, ClientError<T::Error>>
GET /agdx/sessions/{stream}/{id}/state: a session’s state document.
Sourcepub async fn session_links(
&self,
stream: &str,
id: ConversationId,
query: &SessionLinksQuery,
) -> Result<SessionLinksView, ClientError<T::Error>>
pub async fn session_links( &self, stream: &str, id: ConversationId, query: &SessionLinksQuery, ) -> Result<SessionLinksView, ClientError<T::Error>>
GET /agdx/sessions/{stream}/{id}/links: the resources a session
wrote, recalled, or touched.
Sourcepub async fn session_sources(
&self,
stream: &str,
id: ConversationId,
) -> Result<SessionSources, ClientError<T::Error>>
pub async fn session_sources( &self, stream: &str, id: ConversationId, ) -> Result<SessionSources, ClientError<T::Error>>
GET /agdx/sessions/{stream}/{id}/sources: the source partitions that
hold a session’s records.
Sourcepub async fn session_changes(
&self,
stream: &str,
query: &SessionChangesQuery,
) -> Result<SessionChanges, ClientError<T::Error>>
pub async fn session_changes( &self, stream: &str, query: &SessionChangesQuery, ) -> Result<SessionChanges, ClientError<T::Error>>
GET /agdx/sessions/{stream}/changes: the stream’s change rows after
query.after.
Sourcepub async fn get_projection(
&self,
id: &str,
) -> Result<Option<ProjectionInfo>, ClientError<T::Error>>
pub async fn get_projection( &self, id: &str, ) -> Result<Option<ProjectionInfo>, ClientError<T::Error>>
GET /agdx/projections/{id}: read one projection and its bindings, or
None on a 404.
Sourcepub async fn register_projection(
&self,
projection: &Projection,
) -> Result<(), ClientError<T::Error>>
pub async fn register_projection( &self, projection: &Projection, ) -> Result<(), ClientError<T::Error>>
POST /agdx/projections: register or replace a projection (a control
command, durable on the control topic).
Sourcepub async fn register_projection_as(
&self,
projection: &Projection,
operation_id: NonZeroU128,
) -> Result<(), ClientError<T::Error>>
pub async fn register_projection_as( &self, projection: &Projection, operation_id: NonZeroU128, ) -> Result<(), ClientError<T::Error>>
register_projection under the caller’s
operation_id. A control write whose outcome is unknown (Pending) is
safe to re-send with the same id: the plane applies it once.
Sourcepub async fn drop_projection(
&self,
id: &str,
) -> Result<(), ClientError<T::Error>>
pub async fn drop_projection( &self, id: &str, ) -> Result<(), ClientError<T::Error>>
DELETE /agdx/projections/{id}: drop a projection.
Sourcepub async fn drop_projection_as(
&self,
id: &str,
operation_id: NonZeroU128,
) -> Result<(), ClientError<T::Error>>
pub async fn drop_projection_as( &self, id: &str, operation_id: NonZeroU128, ) -> Result<(), ClientError<T::Error>>
drop_projection under the caller’s
operation_id.
Sourcepub async fn apply_binding(
&self,
binding: &ProjectionBinding,
) -> Result<(), ClientError<T::Error>>
pub async fn apply_binding( &self, binding: &ProjectionBinding, ) -> Result<(), ClientError<T::Error>>
POST /agdx/bindings: apply (add or update) a binding.
Sourcepub async fn apply_binding_as(
&self,
binding: &ProjectionBinding,
operation_id: NonZeroU128,
) -> Result<(), ClientError<T::Error>>
pub async fn apply_binding_as( &self, binding: &ProjectionBinding, operation_id: NonZeroU128, ) -> Result<(), ClientError<T::Error>>
apply_binding under the caller’s
operation_id.
Sourcepub async fn remove_binding(
&self,
source: &SourceSelector,
projection_ref: Option<String>,
) -> Result<(), ClientError<T::Error>>
pub async fn remove_binding( &self, source: &SourceSelector, projection_ref: Option<String>, ) -> Result<(), ClientError<T::Error>>
DELETE /agdx/bindings: remove a binding for a source, or one projection
from it when projection_ref is set.
Sourcepub async fn remove_binding_as(
&self,
source: &SourceSelector,
projection_ref: Option<String>,
operation_id: NonZeroU128,
) -> Result<(), ClientError<T::Error>>
pub async fn remove_binding_as( &self, source: &SourceSelector, projection_ref: Option<String>, operation_id: NonZeroU128, ) -> Result<(), ClientError<T::Error>>
remove_binding under the caller’s
operation_id.
Sourcepub async fn get_schema(
&self,
id: u32,
stream: Option<&str>,
) -> Result<Option<SchemaInfo>, ClientError<T::Error>>
pub async fn get_schema( &self, id: u32, stream: Option<&str>, ) -> Result<Option<SchemaInfo>, ClientError<T::Error>>
GET /agdx/schemas/{id}: read one writer schema, or None on a 404.
stream names the stream whose registry holds the id, None the
deployment-wide registry.
Sourcepub async fn drop_schema(
&self,
id: u32,
stream: Option<&str>,
) -> Result<(), ClientError<T::Error>>
pub async fn drop_schema( &self, id: u32, stream: Option<&str>, ) -> Result<(), ClientError<T::Error>>
DELETE /agdx/schemas/{id}: drop (tombstone) a schema. stream names
the stream whose registry holds the id.
Sourcepub async fn drop_schema_as(
&self,
id: u32,
stream: Option<&str>,
operation_id: NonZeroU128,
) -> Result<(), ClientError<T::Error>>
pub async fn drop_schema_as( &self, id: u32, stream: Option<&str>, operation_id: NonZeroU128, ) -> Result<(), ClientError<T::Error>>
drop_schema under the caller’s operation_id.
Sourcepub async fn decode_record(
&self,
id: u32,
payload: &[u8],
stream: Option<&str>,
) -> Result<Option<Value>, ClientError<T::Error>>
pub async fn decode_record( &self, id: u32, payload: &[u8], stream: Option<&str>, ) -> Result<Option<Value>, ClientError<T::Error>>
POST /agdx/schemas/{id}/decode: decode a record body under the schema,
returning its JSON form, or None when the body does not decode under it.
stream names the stream whose registry holds the id.
Sourcepub async fn list_filters(
&self,
query: &FilterListQuery,
) -> Result<FilterPage, ClientError<T::Error>>
pub async fn list_filters( &self, query: &FilterListQuery, ) -> Result<FilterPage, ClientError<T::Error>>
GET /agdx/filters: list saved consumer filters, newest first.
Sourcepub async fn get_filter(
&self,
id: u32,
) -> Result<Option<FilterDetail>, ClientError<T::Error>>
pub async fn get_filter( &self, id: u32, ) -> Result<Option<FilterDetail>, ClientError<T::Error>>
GET /agdx/filters/{id}: one saved filter, or None on a 404.
Sourcepub async fn list_filter_revisions(
&self,
id: u32,
query: &FilterRevisionListQuery,
) -> Result<FilterRevisionPage, ClientError<T::Error>>
pub async fn list_filter_revisions( &self, id: u32, query: &FilterRevisionListQuery, ) -> Result<FilterRevisionPage, ClientError<T::Error>>
GET /agdx/filters/{id}/revisions: the filter’s revisions, newest first.
Sourcepub async fn mutate_filter(
&self,
request: &FilterMutationRequest,
) -> Result<FilterMutationOutcome, ClientError<T::Error>>
pub async fn mutate_filter( &self, request: &FilterMutationRequest, ) -> Result<FilterMutationOutcome, ClientError<T::Error>>
POST /agdx/filters/mutations: apply one catalog mutation. The reply is
the authoritative outcome: applied, rejected (with the typed reason), or
pending (read it later with filter_operation).
A retry with the same operation id returns the first outcome.
Sourcepub async fn filter_operation(
&self,
operation_id: u128,
) -> Result<Option<FilterMutationOutcome>, ClientError<T::Error>>
pub async fn filter_operation( &self, operation_id: u128, ) -> Result<Option<FilterMutationOutcome>, ClientError<T::Error>>
GET /agdx/filters/operations/{id}: a mutation’s outcome, or None when
the catalog has no record of it.
Sourcepub async fn validate_filter(
&self,
filter: &ConsumerFilter,
) -> Result<FilterValidation, ClientError<T::Error>>
pub async fn validate_filter( &self, filter: &ConsumerFilter, ) -> Result<FilterValidation, ClientError<T::Error>>
POST /agdx/filters/validate: validate and compile a filter.
Sourcepub async fn test_filter(
&self,
body: &FilterTestBody,
) -> Result<FilterTestResult, ClientError<T::Error>>
pub async fn test_filter( &self, body: &FilterTestBody, ) -> Result<FilterTestResult, ClientError<T::Error>>
POST /agdx/filters/test: evaluate a filter against one sample and
explain the verdict.
Sourcepub async fn preview_filter(
&self,
request: &FilterPreviewRequest,
) -> Result<FilterPreview, ClientError<T::Error>>
pub async fn preview_filter( &self, request: &FilterPreviewRequest, ) -> Result<FilterPreview, ClientError<T::Error>>
POST /agdx/filters/preview: preview a filter over stored records of
one partition. Joins no group and stores no offset.
Sourcepub async fn list_filter_bindings(
&self,
query: &FilterBindingListQuery,
) -> Result<FilterBindingPage, ClientError<T::Error>>
pub async fn list_filter_bindings( &self, query: &FilterBindingListQuery, ) -> Result<FilterBindingPage, ClientError<T::Error>>
GET /agdx/filter-bindings: list consumer-group filter bindings.
Sourcepub async fn get_filter_binding(
&self,
stream: &str,
topic: &str,
group: &str,
) -> Result<Option<FilterBinding>, ClientError<T::Error>>
pub async fn get_filter_binding( &self, stream: &str, topic: &str, group: &str, ) -> Result<Option<FilterBinding>, ClientError<T::Error>>
GET /agdx/filter-bindings/{stream}/{topic}/{group}: one group’s
binding, or None when the group is not bound.
Sourcepub async fn kv_namespaces(
&self,
) -> Result<Vec<KvNamespaceInfo>, ClientError<T::Error>>
pub async fn kv_namespaces( &self, ) -> Result<Vec<KvNamespaceInfo>, ClientError<T::Error>>
GET /agdx/kv: list the caller’s namespaces and their entry counts.
Sourcepub async fn kv_delete_many(
&self,
namespace: &str,
filter: &KvScanQuery,
) -> Result<usize, ClientError<T::Error>>
pub async fn kv_delete_many( &self, namespace: &str, filter: &KvScanQuery, ) -> Result<usize, ClientError<T::Error>>
DELETE /agdx/kv/{namespace}: bulk-delete entries matching the bounds
(no bounds clears the namespace). Returns the number removed.
Sourcepub async fn kv_delete_many_as(
&self,
namespace: &str,
filter: &KvScanQuery,
operation_id: NonZeroU128,
) -> Result<usize, ClientError<T::Error>>
pub async fn kv_delete_many_as( &self, namespace: &str, filter: &KvScanQuery, operation_id: NonZeroU128, ) -> Result<usize, ClientError<T::Error>>
kv_delete_many under the caller’s
operation_id.
Sourcepub async fn promote_fork(
&self,
id: &str,
) -> Result<usize, ClientError<T::Error>>
pub async fn promote_fork( &self, id: &str, ) -> Result<usize, ClientError<T::Error>>
POST /agdx/forks/{id}/promote: promote a fork’s rows onto the trunk.
Returns the number of rows applied.
Sourcepub async fn promote_fork_as(
&self,
id: &str,
operation_id: NonZeroU128,
) -> Result<usize, ClientError<T::Error>>
pub async fn promote_fork_as( &self, id: &str, operation_id: NonZeroU128, ) -> Result<usize, ClientError<T::Error>>
promote_fork under the caller’s operation_id.
Sourcepub async fn delete_fork(&self, id: &str) -> Result<(), ClientError<T::Error>>
pub async fn delete_fork(&self, id: &str) -> Result<(), ClientError<T::Error>>
DELETE /agdx/forks/{id}: squash (discard) a fork.
Sourcepub async fn delete_fork_as(
&self,
id: &str,
operation_id: NonZeroU128,
) -> Result<(), ClientError<T::Error>>
pub async fn delete_fork_as( &self, id: &str, operation_id: NonZeroU128, ) -> Result<(), ClientError<T::Error>>
delete_fork under the caller’s operation_id.
Sourcepub async fn put_fork_row(
&self,
id: &str,
body: &ForkPutBody,
) -> Result<(), ClientError<T::Error>>
pub async fn put_fork_row( &self, id: &str, body: &ForkPutBody, ) -> Result<(), ClientError<T::Error>>
PUT /agdx/forks/{id}/rows: write one speculative row into a fork.
Sourcepub async fn put_fork_row_as(
&self,
id: &str,
body: &ForkPutBody,
operation_id: NonZeroU128,
) -> Result<(), ClientError<T::Error>>
pub async fn put_fork_row_as( &self, id: &str, body: &ForkPutBody, operation_id: NonZeroU128, ) -> Result<(), ClientError<T::Error>>
put_fork_row under the caller’s operation_id.
Sourcepub async fn graph_query(
&self,
name: &str,
query: &GraphQuery,
) -> Result<GraphResultView, ClientError<T::Error>>
pub async fn graph_query( &self, name: &str, query: &GraphQuery, ) -> Result<GraphResultView, ClientError<T::Error>>
POST /agdx/graph/{name}/query: run a traversal over a named graph, get
back the reachable nodes and traversed edges. Backend-gated by the graph
capability: a deployment without a graph backend answers unsupported.
Sourcepub async fn graph_neighbors(
&self,
name: &str,
node: &str,
query: &GraphNeighborsQuery,
) -> Result<GraphResultView, ClientError<T::Error>>
pub async fn graph_neighbors( &self, name: &str, node: &str, query: &GraphNeighborsQuery, ) -> Result<GraphResultView, ClientError<T::Error>>
GET /agdx/graph/{name}/neighbors/{node}: the neighbor read, the cheap
common traversal. node is the Crockford-base32 node id. query carries
the direction, an optional edge-type filter, the hop depth, and a limit (a
default query reads one hop outward with no filter).
Sourcepub async fn list_graphs(
&self,
filter: &ProjectionListQuery,
) -> Result<Vec<ProjectionInfo>, ClientError<T::Error>>
pub async fn list_graphs( &self, filter: &ProjectionListQuery, ) -> Result<Vec<ProjectionInfo>, ClientError<T::Error>>
GET /agdx/graphs: list the registered graph projections, the discovery
surface a graph explorer reads to offer the available graphs. Reuses the
projection-list filter, narrowed to graph-kind projections server-side.
Sourcepub async fn register_graph(
&self,
projection: &Projection,
) -> Result<(), ClientError<T::Error>>
pub async fn register_graph( &self, projection: &Projection, ) -> Result<(), ClientError<T::Error>>
POST /agdx/graphs: register a graph projection (a Projection with
kind = Graph and an entity schema). Applied asynchronously, like every
control command.
Sourcepub async fn register_graph_as(
&self,
projection: &Projection,
operation_id: NonZeroU128,
) -> Result<(), ClientError<T::Error>>
pub async fn register_graph_as( &self, projection: &Projection, operation_id: NonZeroU128, ) -> Result<(), ClientError<T::Error>>
register_graph under the caller’s
operation_id.
Sourcepub async fn get_graph(
&self,
id: &str,
) -> Result<Option<ProjectionInfo>, ClientError<T::Error>>
pub async fn get_graph( &self, id: &str, ) -> Result<Option<ProjectionInfo>, ClientError<T::Error>>
GET /agdx/graphs/{id}: read one graph projection by id, or None when no
graph projection has it.
Sourcepub async fn drop_graph(&self, id: &str) -> Result<(), ClientError<T::Error>>
pub async fn drop_graph(&self, id: &str) -> Result<(), ClientError<T::Error>>
DELETE /agdx/graphs/{id}: drop the graph projection registered under
id. The materialized nodes and edges are left untouched.
Sourcepub async fn drop_graph_as(
&self,
id: &str,
operation_id: NonZeroU128,
) -> Result<(), ClientError<T::Error>>
pub async fn drop_graph_as( &self, id: &str, operation_id: NonZeroU128, ) -> Result<(), ClientError<T::Error>>
drop_graph under the caller’s operation_id.
Sourcepub async fn authz_whoami(&self) -> Result<WhoamiReply, ClientError<T::Error>>
pub async fn authz_whoami(&self) -> Result<WhoamiReply, ClientError<T::Error>>
GET /agdx/authz/whoami: the caller’s own bound roles and effective
grants. Backend-gated by the authz capability: a deployment that does
not serve the authorization band answers unsupported.
Sourcepub async fn list_roles(&self) -> Result<Vec<Role>, ClientError<T::Error>>
pub async fn list_roles(&self) -> Result<Vec<Role>, ClientError<T::Error>>
GET /agdx/authz/roles: every defined role with its full grant set.
Sourcepub async fn get_role(
&self,
name: &str,
) -> Result<Option<Role>, ClientError<T::Error>>
pub async fn get_role( &self, name: &str, ) -> Result<Option<Role>, ClientError<T::Error>>
GET /agdx/authz/roles/{name}: one role by name, or None on a 404.
Sourcepub async fn define_role(
&self,
role: &Role,
) -> Result<(), ClientError<T::Error>>
pub async fn define_role( &self, role: &Role, ) -> Result<(), ClientError<T::Error>>
PUT /agdx/authz/roles/{name}: define or replace a role. The path name is
authoritative, so role.name must match it.
Sourcepub async fn delete_role(&self, name: &str) -> Result<(), ClientError<T::Error>>
pub async fn delete_role(&self, name: &str) -> Result<(), ClientError<T::Error>>
DELETE /agdx/authz/roles/{name}: delete a role.
Sourcepub async fn user_roles(
&self,
user_id: u32,
) -> Result<Vec<String>, ClientError<T::Error>>
pub async fn user_roles( &self, user_id: u32, ) -> Result<Vec<String>, ClientError<T::Error>>
GET /agdx/authz/users/{id}/roles: one user’s bound role names.
Sourcepub async fn bind_user_roles(
&self,
user_id: u32,
roles: &[String],
) -> Result<(), ClientError<T::Error>>
pub async fn bind_user_roles( &self, user_id: u32, roles: &[String], ) -> Result<(), ClientError<T::Error>>
PUT /agdx/authz/users/{id}/roles: replace the user’s whole role set.
Trait Implementations§
Source§impl<T: Clone> Clone for HttpClient<T>
impl<T: Clone> Clone for HttpClient<T>
Auto Trait Implementations§
impl<T> Freeze for HttpClient<T>where
T: Freeze,
impl<T> RefUnwindSafe for HttpClient<T>where
T: RefUnwindSafe,
impl<T> Send for HttpClient<T>where
T: Send,
impl<T> Sync for HttpClient<T>where
T: Sync,
impl<T> Unpin for HttpClient<T>where
T: Unpin,
impl<T> UnsafeUnpin for HttpClient<T>where
T: UnsafeUnpin,
impl<T> UnwindSafe for HttpClient<T>where
T: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> FmtForward for T
impl<T> FmtForward for T
Source§fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
fn fmt_binary(self) -> FmtBinary<Self>where
Self: Binary,
self to use its Binary implementation when Debug-formatted.Source§fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
fn fmt_display(self) -> FmtDisplay<Self>where
Self: Display,
self to use its Display implementation when
Debug-formatted.Source§fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
fn fmt_lower_exp(self) -> FmtLowerExp<Self>where
Self: LowerExp,
self to use its LowerExp implementation when
Debug-formatted.Source§fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
fn fmt_lower_hex(self) -> FmtLowerHex<Self>where
Self: LowerHex,
self to use its LowerHex implementation when
Debug-formatted.Source§fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
fn fmt_octal(self) -> FmtOctal<Self>where
Self: Octal,
self to use its Octal implementation when Debug-formatted.Source§fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
fn fmt_pointer(self) -> FmtPointer<Self>where
Self: Pointer,
self to use its Pointer implementation when
Debug-formatted.Source§fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
fn fmt_upper_exp(self) -> FmtUpperExp<Self>where
Self: UpperExp,
self to use its UpperExp implementation when
Debug-formatted.Source§fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
fn fmt_upper_hex(self) -> FmtUpperHex<Self>where
Self: UpperHex,
self to use its UpperHex implementation when
Debug-formatted.Source§impl<T> Pipe for Twhere
T: ?Sized,
impl<T> Pipe for Twhere
T: ?Sized,
Source§fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
fn pipe<R>(self, func: impl FnOnce(Self) -> R) -> Rwhere
Self: Sized,
Source§fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref<'a, R>(&'a self, func: impl FnOnce(&'a Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
fn pipe_ref_mut<'a, R>(&'a mut self, func: impl FnOnce(&'a mut Self) -> R) -> Rwhere
R: 'a,
self and passes that borrow into the pipe function. Read moreSource§fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
fn pipe_borrow<'a, B, R>(&'a self, func: impl FnOnce(&'a B) -> R) -> R
Source§fn pipe_borrow_mut<'a, B, R>(
&'a mut self,
func: impl FnOnce(&'a mut B) -> R,
) -> R
fn pipe_borrow_mut<'a, B, R>( &'a mut self, func: impl FnOnce(&'a mut B) -> R, ) -> R
Source§fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
fn pipe_as_ref<'a, U, R>(&'a self, func: impl FnOnce(&'a U) -> R) -> R
self, then passes self.as_ref() into the pipe function.Source§fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
fn pipe_as_mut<'a, U, R>(&'a mut self, func: impl FnOnce(&'a mut U) -> R) -> R
self, then passes self.as_mut() into the pipe
function.Source§fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
fn pipe_deref<'a, T, R>(&'a self, func: impl FnOnce(&'a T) -> R) -> R
self, then passes self.deref() into the pipe function.impl<T> Read<Exclusive, BecauseExclusive> for Twhere
T: ?Sized,
Source§impl<T> Tap for T
impl<T> Tap for T
Source§fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow<B>(self, func: impl FnOnce(&B)) -> Self
Borrow<B> of a value. Read moreSource§fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut<B>(self, func: impl FnOnce(&mut B)) -> Self
BorrowMut<B> of a value. Read moreSource§fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref<R>(self, func: impl FnOnce(&R)) -> Self
AsRef<R> view of a value. Read moreSource§fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut<R>(self, func: impl FnOnce(&mut R)) -> Self
AsMut<R> view of a value. Read moreSource§fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref<T>(self, func: impl FnOnce(&T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
fn tap_deref_mut<T>(self, func: impl FnOnce(&mut T)) -> Self
Deref::Target of a value. Read moreSource§fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
fn tap_dbg(self, func: impl FnOnce(&Self)) -> Self
.tap() only in debug builds, and is erased in release builds.Source§fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
fn tap_mut_dbg(self, func: impl FnOnce(&mut Self)) -> Self
.tap_mut() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
fn tap_borrow_dbg<B>(self, func: impl FnOnce(&B)) -> Self
.tap_borrow() only in debug builds, and is erased in release
builds.Source§fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
fn tap_borrow_mut_dbg<B>(self, func: impl FnOnce(&mut B)) -> Self
.tap_borrow_mut() only in debug builds, and is erased in release
builds.Source§fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
fn tap_ref_dbg<R>(self, func: impl FnOnce(&R)) -> Self
.tap_ref() only in debug builds, and is erased in release
builds.Source§fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
fn tap_ref_mut_dbg<R>(self, func: impl FnOnce(&mut R)) -> Self
.tap_ref_mut() only in debug builds, and is erased in release
builds.Source§fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
fn tap_deref_dbg<T>(self, func: impl FnOnce(&T)) -> Self
.tap_deref() only in debug builds, and is erased in release
builds.