Crate openiap_client

Source
Expand description

The openiap.client crate provides the Client struct and its methods. For now this is only the GRPC and WebSocket client, later we will add a web rest, named pipe and TCP client as well. Initialize a new client, by calling the Client::new_connect method.

use openiap_client::{OpenIAPError, Client, QueryRequest};
#[tokio::main]
async fn main() -> Result<(), OpenIAPError> {
    let client = Client::new_connect("").await?;
    let q = client.query( QueryRequest::with_projection(
        "entities",
        "{}",
        "{\"name\":1}"
    )).await?;
    let items: serde_json::Value = serde_json::from_str(&q.results).unwrap();
    let items: &Vec<serde_json::Value> = items.as_array().unwrap();
    for item in items {
        println!("Item: {:?}", item);
    }
    Ok(())
}

Modules§

agent
The agent module provides the Agent struct and its methods.
base
The base module provides the CustomCommandRequest struct and its methods.
download
The download module provides the Download struct and its methods.
errors
The errors module provides the Error struct and its methods.
flow_service_client
Generated client implementations.
flow_service_server
Generated server implementations.
protos
The protos module provides the Envelope, ErrorResponse, SigninRequest, SigninResponse, RegisterQueueRequest, UnRegisterQueueRequest, RegisterExchangeRequest, WatchRequest, UnWatchRequest, QueueMessageRequest, QueryRequest, QueryResponse, UploadRequest, UploadResponse, DownloadRequest, DownloadResponse, WorkItem, and WorkItemResponse structs and their methods.
query
The query module provides the Query struct and its methods.
queue
The queue module provides the RegisterQueueRequest, UnRegisterQueueRequest, RegisterExchangeRequest, WatchRequest, UnWatchRequest, and QueueMessageRequest structs and their methods.
signin
The signin module provides the SigninRequest struct and its methods.
upload
The upload module provides the Upload struct and its methods.
workitem
The workitem module provides the WorkItem struct and its methods.

Structs§

Ace
AddWorkItemQueueRequest
AddWorkItemQueueResponse
AggregateRequest
AggregateResponse
BeginStream
Client
The Client struct provides the client for the OpenIAP service. Initialize a new client, by calling the Client::new_connect method.
ClientInner
The ClientInner struct provides the inner client for the OpenIAP service.
ClientStatistics
The ClientStatistics struct provides the statistics for usage of the client
ColCollation
ColTimeseries
Config
The Config struct provides the configuration for the OpenIAP service we are connecting to.
CountRequest
CountResponse
CreateCollectionRequest
CreateCollectionResponse
CreateIndexRequest
CreateIndexResponse
CreateWorkflowInstanceRequest
CreateWorkflowInstanceResponse
CustomCommandRequest
CustomCommandResponse
Customer
DeleteAgentPodRequest
DeleteAgentPodResponse
DeleteAgentRequest
DeleteAgentResponse
DeleteManyRequest
DeleteManyResponse
DeleteOneRequest
DeleteOneResponse
DeletePackageRequest
DeletePackageResponse
DeleteWorkItemQueueRequest
DeleteWorkItemQueueResponse
DeleteWorkitemRequest
DeleteWorkitemResponse
DistinctRequest
DistinctResponse
DownloadRequest
DownloadResponse
DropCollectionRequest
DropCollectionResponse
DropIndexRequest
DropIndexResponse
EndStream
EnsureCustomerRequest
EnsureCustomerResponse
Envelope
ErrorResponse
FlowServiceClient
Service for managing OpenIAP Flow (OpenFlow)
GetAgentLogRequest
GetAgentLogResponse
GetAgentPodsRequest
GetAgentPodsResponse
GetDocumentVersionRequest
GetDocumentVersionResponse
GetElementRequest
GetElementResponse
GetIndexesRequest
GetIndexesResponse
InsertManyRequest
InsertManyResponse
InsertOneRequest
InsertOneResponse
InsertOrUpdateManyRequest
InsertOrUpdateManyResponse
InsertOrUpdateOneRequest
InsertOrUpdateOneResponse
InvokeOpenRpaRequest
InvokeOpenRpaResponse
ListCollectionsRequest
ListCollectionsResponse
Noop
PingRequest
PingResponse
PopWorkitemRequest
PopWorkitemResponse
PushWorkitemRequest
PushWorkitemResponse
PushWorkitemsRequest
PushWorkitemsResponse
QueryRequest
MongoDB Query Request.
QueryResponse
QueueEvent
QueueMessageRequest
QueueMessageResponse
RefreshToken
RegisterExchangeRequest
RegisterExchangeResponse
RegisterQueueRequest
RegisterQueueResponse
Role
SigninRequest
SigninResponse
StartAgentRequest
StartAgentResponse
Stat
StopAgentRequest
StopAgentResponse
Stream
StripeCoupon
StripeCustomer
StripeCustomerAddress
StripeCustomerDiscount
StripePlan
StripePrice
StripeRecurring
StripeSubscription
StripeSubscriptionItem
StripeTaxId
StripeTaxVerification
Timestamp
A Timestamp represents a point in time independent of any time zone or local calendar, encoded as a count of seconds and fractions of seconds at nanosecond resolution. The count is relative to an epoch at UTC midnight on January 1, 1970, in the proleptic Gregorian calendar which extends the Gregorian calendar backwards to year one.
UnRegisterQueueRequest
UnRegisterQueueResponse
UnWatchRequest
UnWatchResponse
UpdateDocumentRequest
UpdateDocumentResponse
UpdateOneRequest
UpdateOneResponse
UpdateResult
UpdateWorkItemQueueRequest
UpdateWorkItemQueueResponse
UpdateWorkitemRequest
UpdateWorkitemResponse
UploadRequest
UploadResponse
User
WatchEvent
WatchRequest
WatchResponse
WorkItemQueue
Workitem
WorkitemFile

Enums§

ClientEnum
Client enum, used to determine which client to use.
ClientEvent
Client event enum, used to determine which event has occurred.
ClientState
Client event enum, used to determine which event has occurred.
OpenIAPError
Error type for OpenIAP

Functions§

disable_observable_gauge
Disable an observable gauge metric.
disable_tracing
Disable tracing by setting a “none” filter and no span events
enable_tracing
Public function: call as many times as you want Added span_events: &str to control how span events are logged
set_f64_observable_gauge
Create/Update an onservable gauge metric that can be updated dynamically. this means the value will be stored and send doing each metric update.
set_i64_observable_gauge
Create/Update an onservable gauge metric that can be updated dynamically. this means the value will be stored and send doing each metric update.
set_otel_url
Set the OTel endpoint URL for bridging
set_u64_observable_gauge
Create/Update an onservable gauge metric that can be updated dynamically. this means the value will be stored and send doing each metric update.