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
agentmodule provides theAgentstruct and its methods. - base
- The
basemodule provides theCustomCommandRequeststruct and its methods. - download
- The
downloadmodule provides theDownloadstruct and its methods. - errors
- The
errorsmodule provides theErrorstruct and its methods. - flow_
service_ client - Generated client implementations.
- flow_
service_ server - Generated server implementations.
- openiap
- query
- The
querymodule provides theQuerystruct and its methods. - queue
- The
queuemodule provides theRegisterQueueRequest,UnRegisterQueueRequest,RegisterExchangeRequest,WatchRequest,UnWatchRequest, andQueueMessageRequeststructs and their methods. - signin
- The
signinmodule provides theSigninRequeststruct and its methods. - upload
- The
uploadmodule provides theUploadstruct and its methods. - workitem
- The
workitemmodule provides theWorkItemstruct and its methods.
Structs§
- Ace
- AddWork
Item Queue Request - AddWork
Item Queue Response - Aggregate
Request - Aggregate
Response - Begin
Stream - Client
- The
Clientstruct provides the client for the OpenIAP service. Initialize a new client, by calling the Client::new_connect method. - Client
Inner - The
ClientInnerstruct provides the inner client for the OpenIAP service. - Client
Statistics - The
ClientStatisticsstruct provides the statistics for usage of the client - ColCollation
- ColTimeseries
- Config
- The
Configstruct provides the configuration for the OpenIAP service we are connecting to. - Count
Request - Count
Response - Create
Collection Request - Create
Collection Response - Create
Index Request - Create
Index Response - Create
Workflow Instance Request - Create
Workflow Instance Response - Custom
Command Request - Custom
Command Response - Customer
- Delete
Agent PodRequest - Delete
Agent PodResponse - Delete
Agent Request - Delete
Agent Response - Delete
Many Request - Delete
Many Response - Delete
OneRequest - Delete
OneResponse - Delete
Package Request - Delete
Package Response - Delete
Work Item Queue Request - Delete
Work Item Queue Response - Delete
Workitem Request - Delete
Workitem Response - Distinct
Request - Distinct
Response - Download
Request - Download
Response - Drop
Collection Request - Drop
Collection Response - Drop
Index Request - Drop
Index Response - EndStream
- Ensure
Customer Request - Ensure
Customer Response - EnvConfig
- The
EnvConfigstruct provides the environment configuration for the OpenIAP service. to use Custom JWT for only this command, and to provide traceid and spanid for tracing. - Envelope
- Error
Response - Flow
Service Client - Service for managing OpenIAP Flow (OpenFlow)
- GetAgent
LogRequest - GetAgent
LogResponse - GetAgent
Pods Request - GetAgent
Pods Response - GetDocument
Version Request - GetDocument
Version Response - GetElement
Request - GetElement
Response - GetIndexes
Request - GetIndexes
Response - Insert
Many Request - Insert
Many Response - Insert
OneRequest - Insert
OneResponse - Insert
OrUpdate Many Request - Insert
OrUpdate Many Response - Insert
OrUpdate OneRequest - Insert
OrUpdate OneResponse - Invoke
Open RpaRequest - Invoke
Open RpaResponse - List
Collections Request - List
Collections Response - Noop
- Ping
Request - Ping
Response - PopWorkitem
Request - PopWorkitem
Response - Push
Workitem Request - Push
Workitem Response - Push
Workitems Request - Push
Workitems Response - Query
Request - MongoDB Query Request.
- Query
Response - Queue
Event - Queue
Message Request - Queue
Message Response - Refresh
Token - Register
Exchange Request - Register
Exchange Response - Register
Queue Request - Register
Queue Response - Role
- Signin
Request - Signin
Response - Start
Agent Request - Start
Agent Response - Stat
- Stop
Agent Request - Stop
Agent Response - Stream
- Stripe
Coupon - Stripe
Customer - Stripe
Customer Address - Stripe
Customer Discount - Stripe
Plan - Stripe
Price - Stripe
Recurring - Stripe
Subscription - Stripe
Subscription Item - Stripe
TaxId - Stripe
TaxVerification - 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.
- UnRegister
Queue Request - UnRegister
Queue Response - UnWatch
Request - UnWatch
Response - Update
Document Request - Update
Document Response - Update
OneRequest - Update
OneResponse - Update
Result - Update
Work Item Queue Request - Update
Work Item Queue Response - Update
Workitem Request - Update
Workitem Response - Upload
Request - Upload
Response - User
- Watch
Event - Watch
Request - Watch
Response - Work
Item Queue - Workitem
- Workitem
File
Enums§
- Client
Enum - Client enum, used to determine which client to use.
- Client
Event - Client event enum, used to determine which event has occurred.
- Client
State - Client event enum, used to determine which event has occurred.
- OpenIAP
Error - 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: &strto 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.