Struct FlowServiceClient

Source
pub struct FlowServiceClient<T> { /* private fields */ }
Expand description

Service for managing OpenIAP Flow (OpenFlow)

Implementations§

Source§

impl FlowServiceClient<Channel>

Source

pub async fn connect<D>(dst: D) -> Result<FlowServiceClient<Channel>, Error>
where D: TryInto<Endpoint>, <D as TryInto<Endpoint>>::Error: Into<Box<dyn Error + Send + Sync>>,

Attempt to create a new client by connecting to a given endpoint.

Source§

impl<T> FlowServiceClient<T>

Source

pub fn new(inner: T) -> FlowServiceClient<T>

Source

pub fn with_origin(inner: T, origin: Uri) -> FlowServiceClient<T>

Source

pub fn with_interceptor<F>( inner: T, interceptor: F, ) -> FlowServiceClient<InterceptedService<T, F>>

Source

pub fn send_compressed( self, encoding: CompressionEncoding, ) -> FlowServiceClient<T>

Compress requests with the given encoding.

This requires the server to support it otherwise it might respond with an error.

Source

pub fn accept_compressed( self, encoding: CompressionEncoding, ) -> FlowServiceClient<T>

Enable decompressing responses.

Source

pub fn max_decoding_message_size(self, limit: usize) -> FlowServiceClient<T>

Limits the maximum size of a decoded message.

Default: 4MB

Source

pub fn max_encoding_message_size(self, limit: usize) -> FlowServiceClient<T>

Limits the maximum size of an encoded message.

Default: usize::MAX

Source

pub async fn setup_stream( &mut self, request: impl IntoStreamingRequest<Message = Envelope>, ) -> Result<Response<Streaming<Envelope>>, Status>

Establishes a bidirectional streaming connection for sending and receiving Envelopes. This method is used to set up a real-time data stream for communication. Returns a bidirectional stream of Envelopes.

Source

pub async fn signin( &mut self, request: impl IntoRequest<SigninRequest>, ) -> Result<Response<SigninResponse>, Status>

Signs in a user with the provided SigninRequest and returns a SigninResponse. This method authenticates a user and provides access to the OpenFlow system. Returns a SigninResponse containing authentication details.

Source

pub async fn download( &mut self, request: impl IntoRequest<DownloadRequest>, ) -> Result<Response<DownloadResponse>, Status>

Downloads a file from OpenFlow This method retrieves files from the OpenFlow system based on the specified criteria. This will initiaize a DownLoad stream, and once completed send send a DownloadResponse

Source

pub async fn upload( &mut self, request: impl IntoRequest<UploadRequest>, ) -> Result<Response<UploadResponse>, Status>

Uploads data based on the provided UploadRequest and returns an UploadResponse. This method allows users to upload data to the OpenFlow system. Returns an UploadResponse confirming the successful upload.

Source

pub async fn custom_command( &mut self, request: impl IntoRequest<CustomCommandRequest>, ) -> Result<Response<CustomCommandResponse>, Status>

Executes a custom command in OpenIAP Flow. This method enables the execution of custom commands within the OpenFlow system. Returns a CustomCommandResponse with the result of the command execution.

Source

pub async fn list_collections( &mut self, request: impl IntoRequest<ListCollectionsRequest>, ) -> Result<Response<ListCollectionsResponse>, Status>

Lists all MongoDB collections the user has access to. This method provides a list of collections that the user can interact with in the MongoDB database. Returns a ListCollectionsResponse containing collection names.

Source

pub async fn drop_collection( &mut self, request: impl IntoRequest<DropCollectionRequest>, ) -> Result<Response<DropCollectionResponse>, Status>

Drops a MongoDB Collection, requires user is a member of admins role. This method allows administrators to delete a MongoDB collection. Returns a DropCollectionResponse confirming the deletion.

Source

pub async fn create_collection( &mut self, request: impl IntoRequest<CreateCollectionRequest>, ) -> Result<Response<CreateCollectionResponse>, Status>

Creates a new MongoDB collection, useful if you need to create with parameters like creating a TimeSeries Collection. This method creates a new MongoDB collection with optional parameters. Returns a CreateCollectionResponse indicating the success of collection creation.

Source

pub async fn query( &mut self, request: impl IntoRequest<QueryRequest>, ) -> Result<Response<QueryResponse>, Status>

Performs a query using QueryRequest and returns a QueryResponse. This method executes a query operation in the MongoDB database. Returns a QueryResponse with query results.

Source

pub async fn get_document_version( &mut self, request: impl IntoRequest<GetDocumentVersionRequest>, ) -> Result<Response<GetDocumentVersionResponse>, Status>

Retrieves a document’s version using GetDocumentVersionRequest and returns a GetDocumentVersionResponse. This method retrieves a specific version of a document. Returns a GetDocumentVersionResponse with the requested document version.

Source

pub async fn aggregate( &mut self, request: impl IntoRequest<AggregateRequest>, ) -> Result<Response<AggregateResponse>, Status>

Aggregates data based on AggregateRequest and returns an AggregateResponse. This method performs data aggregation operations on the MongoDB database. Returns an AggregateResponse with the aggregated data.

Source

pub async fn count( &mut self, request: impl IntoRequest<CountRequest>, ) -> Result<Response<CountResponse>, Status>

Counts documents based on CountRequest and returns a CountResponse. This method counts documents in the MongoDB database based on specified criteria. Returns a CountResponse with the count result.

Source

pub async fn insert_one( &mut self, request: impl IntoRequest<InsertOneRequest>, ) -> Result<Response<InsertOneResponse>, Status>

Inserts a single document using InsertOneRequest and returns an InsertOneResponse. This method inserts a single document into the MongoDB database. Returns an InsertOneResponse confirming the insertion.

Source

pub async fn insert_many( &mut self, request: impl IntoRequest<InsertManyRequest>, ) -> Result<Response<InsertManyResponse>, Status>

Inserts multiple documents using InsertManyRequest and returns an InsertManyResponse. This method inserts multiple documents into the MongoDB database. Returns an InsertManyResponse confirming the insertions.

Source

pub async fn update_one( &mut self, request: impl IntoRequest<UpdateOneRequest>, ) -> Result<Response<UpdateOneResponse>, Status>

Updates a single document using UpdateOneRequest and returns an UpdateOneResponse. This method updates a single document in the MongoDB database. Returns an UpdateOneResponse confirming the update.

Source

pub async fn update_document( &mut self, request: impl IntoRequest<UpdateDocumentRequest>, ) -> Result<Response<UpdateDocumentResponse>, Status>

Updates documents using UpdateDocumentRequest and returns an UpdateDocumentResponse. This method updates multiple documents in the MongoDB database. Returns an UpdateDocumentResponse confirming the updates.

Source

pub async fn insert_or_update_one( &mut self, request: impl IntoRequest<InsertOrUpdateOneRequest>, ) -> Result<Response<InsertOrUpdateOneResponse>, Status>

Inserts or updates a single document using InsertOrUpdateOneRequest and returns an InsertOrUpdateOneResponse. This method either inserts or updates a single document in the MongoDB database. Returns an InsertOrUpdateOneResponse confirming the operation.

Source

pub async fn insert_or_update_many( &mut self, request: impl IntoRequest<InsertOrUpdateManyRequest>, ) -> Result<Response<InsertOrUpdateManyResponse>, Status>

Inserts or updates multiple documents using InsertOrUpdateManyRequest and returns an InsertOrUpdateManyResponse. This method either inserts or updates multiple documents in the MongoDB database. Returns an InsertOrUpdateManyResponse confirming the operation.

Source

pub async fn delete_one( &mut self, request: impl IntoRequest<DeleteOneRequest>, ) -> Result<Response<DeleteOneResponse>, Status>

Deletes a single document using DeleteOneRequest and returns a DeleteOneResponse. This method deletes a single document from the MongoDB database. Returns a DeleteOneResponse confirming the deletion.

Source

pub async fn delete_many( &mut self, request: impl IntoRequest<DeleteManyRequest>, ) -> Result<Response<DeleteManyResponse>, Status>

Deletes multiple documents using DeleteManyRequest and returns a DeleteManyResponse. This method deletes multiple documents from the MongoDB database. Returns a DeleteManyResponse confirming the deletions.

Source

pub async fn register_queue( &mut self, request: impl IntoRequest<RegisterQueueRequest>, ) -> Result<Response<RegisterQueueResponse>, Status>

Registers a queue using RegisterQueueRequest and returns a RegisterQueueResponse. This method registers and starts consuming a queue for message routing using AMQP Returns a RegisterQueueResponse confirming the registration.

Source

pub async fn register_exchange( &mut self, request: impl IntoRequest<RegisterExchangeRequest>, ) -> Result<Response<RegisterExchangeResponse>, Status>

Registers an exchange using RegisterExchangeRequest and returns a RegisterExchangeResponse. This method registers an exchange and start consuming if for message routing using AMQP Returns a RegisterExchangeResponse confirming the registration.

Source

pub async fn queue_message( &mut self, request: impl IntoRequest<QueueMessageRequest>, ) -> Result<Response<QueueMessageResponse>, Status>

Sends a message to a queue using QueueMessageRequest and returns a QueueMessageResponse. This method sends a message to a registered queue for processing. Returns a QueueMessageResponse confirming the message transmission.

Source

pub async fn un_register_queue( &mut self, request: impl IntoRequest<UnRegisterQueueRequest>, ) -> Result<Response<UnRegisterQueueResponse>, Status>

Unregisters a queue using UnRegisterQueueRequest and returns an UnRegisterQueueResponse. This method unregisters a previously registered queue or Exchange. Returns an UnRegisterQueueResponse confirming the unregistration.

Source

pub async fn watch( &mut self, request: impl IntoRequest<WatchRequest>, ) -> Result<Response<WatchResponse>, Status>

Watches for changes using WatchRequest and returns a WatchResponse. This method enables clients to watch for changes in a MongoDB collections, use paths (JSONQuerys) to limit what documents to wath. Returns a WatchResponse with relevant notifications.

Source

pub async fn un_watch( &mut self, request: impl IntoRequest<UnWatchRequest>, ) -> Result<Response<UnWatchResponse>, Status>

Stops watching for changes using UnWatchRequest and returns an UnWatchResponse. This method stops the client from watching for changes formerly registered using Watch Returns an UnWatchResponse confirming the cessation of watching.

Source

pub async fn push_workitem( &mut self, request: impl IntoRequest<PushWorkitemRequest>, ) -> Result<Response<PushWorkitemResponse>, Status>

This method pushes (adds) a Workitem to a ‘WorkItemQueue’ Returns a PushWorkitemResponse confirming the operation.

Source

pub async fn push_workitems( &mut self, request: impl IntoRequest<PushWorkitemsRequest>, ) -> Result<Response<PushWorkitemsResponse>, Status>

Pushes multiple Workitems using PushWorkitemsRequest and returns a PushWorkitemsResponse. This method pushes multiple Workitems to a ‘WorkItemQueue’. Returns a PushWorkitemsResponse confirming the operation.

Source

pub async fn update_workitem( &mut self, request: impl IntoRequest<UpdateWorkitemRequest>, ) -> Result<Response<UpdateWorkitemResponse>, Status>

Updates a Workitem using UpdateWorkitemRequest and returns an UpdateWorkitemResponse. This method updates a Workitem in the ‘WorkItemQueue’. Returns an UpdateWorkitemResponse confirming the update.

Source

pub async fn pop_workitem( &mut self, request: impl IntoRequest<PopWorkitemRequest>, ) -> Result<Response<PopWorkitemResponse>, Status>

Pops a Workitem using PopWorkitemRequest and returns a PopWorkitemResponse. This method pops a Workitem from the ‘WorkItemQueue’ for execution. Returns a PopWorkitemResponse with the popped Workitem.

Source

pub async fn delete_workitem( &mut self, request: impl IntoRequest<DeleteWorkitemRequest>, ) -> Result<Response<DeleteWorkitemResponse>, Status>

Deletes a Workitem using DeleteWorkitemRequest and returns a DeleteWorkitemResponse. This method deletes a Workitem from the ‘WorkItemQueue’. Returns a DeleteWorkitemResponse confirming the deletion.

Source

pub async fn add_work_item_queue( &mut self, request: impl IntoRequest<AddWorkItemQueueRequest>, ) -> Result<Response<AddWorkItemQueueResponse>, Status>

This Created a new WorkitemQueue'. These Queues can store Workitem`s Returns an AddWorkItemQueueResponse confirming the addition.

Source

pub async fn update_work_item_queue( &mut self, request: impl IntoRequest<UpdateWorkItemQueueRequest>, ) -> Result<Response<UpdateWorkItemQueueResponse>, Status>

Updates an existing WorkitemQueue' This method updates the configuration of a WorkitemQueue’. Will also deleted all associated Workitems if purge is enabled. Returns an UpdateWorkItemQueueResponse confirming the update.

Source

pub async fn delete_work_item_queue( &mut self, request: impl IntoRequest<DeleteWorkItemQueueRequest>, ) -> Result<Response<DeleteWorkItemQueueResponse>, Status>

Deletes a WorkitemQueue' This method deletes a WorkitemQueue’ queue. Will also deleted all associated Workitems if purge is enabled. Returns a DeleteWorkItemQueueResponse confirming the deletion.

Source

pub async fn ensure_customer( &mut self, request: impl IntoRequest<EnsureCustomerRequest>, ) -> Result<Response<EnsureCustomerResponse>, Status>

Ensures the existence of a customer using EnsureCustomerRequest and returns an EnsureCustomerResponse. This method ensures that a customer exists in the system and performs necessary actions. Returns an EnsureCustomerResponse confirming the operation.

Source

pub async fn invoke_open_rpa( &mut self, request: impl IntoRequest<InvokeOpenRpaRequest>, ) -> Result<Response<InvokeOpenRpaResponse>, Status>

Execute a workflow on a OpenRPA robot. If rpc is true, will wait for reply and return reply ( this can take a long time !)

Source

pub async fn start_agent( &mut self, request: impl IntoRequest<StartAgentRequest>, ) -> Result<Response<StartAgentResponse>, Status>

Start an agent inside Docker or Kubernetes agentid is the _id of an agent from the agents collection Requires invoke permission on agent

Source

pub async fn stop_agent( &mut self, request: impl IntoRequest<StopAgentRequest>, ) -> Result<Response<StopAgentResponse>, Status>

Stop an agent running inside Docker or Kubernetes agentid is the _id of an agent from the agents collection Requires invoke permission on agent

Source

pub async fn get_agent_log( &mut self, request: impl IntoRequest<GetAgentLogRequest>, ) -> Result<Response<GetAgentLogResponse>, Status>

Return the console output of an running agent, can be in docker, kubernetes or running remote. agentid is the _id of an agent from the agents collection Requires invoke permission on agent

Source

pub async fn get_agent_pods( &mut self, request: impl IntoRequest<GetAgentPodsRequest>, ) -> Result<Response<GetAgentPodsResponse>, Status>

Return a list of pods for an running agent. Docker and Kubernetes only. agentid is the _id of an agent from the agents collection Requires invoke permission on agent

Source

pub async fn delete_agent_pod( &mut self, request: impl IntoRequest<DeleteAgentPodRequest>, ) -> Result<Response<DeleteAgentPodResponse>, Status>

Remove an agent pod, found with GetAgentPods. Docker and Kubernetes only. On kubernetes this will restart it, on Docker this will kill it agentid is the _id of an agent from the agents collection Requires invoke permission on agent

Source

pub async fn delete_agent( &mut self, request: impl IntoRequest<DeleteAgentRequest>, ) -> Result<Response<DeleteAgentResponse>, Status>

Remove an agent if running. Docker and Kubernetes only. Removes instance on docker, remove deployment, ingress and other resources on Kubernetes agentid is the _id of an agent from the agents collection Requires delete permission on agent

Source

pub async fn create_index( &mut self, request: impl IntoRequest<CreateIndexRequest>, ) -> Result<Response<CreateIndexResponse>, Status>

Create an Index on a MongoDB Collection Will not fail if exists, but will fail if spec is different from existing. Require admins rights

Source

pub async fn get_indexes( &mut self, request: impl IntoRequest<GetIndexesRequest>, ) -> Result<Response<GetIndexesResponse>, Status>

Create an Index on a MongoDB Collection Will not fail if exists, but will fail if spec is different from existing. Require admins rights

Source

pub async fn drop_index( &mut self, request: impl IntoRequest<DropIndexRequest>, ) -> Result<Response<DropIndexResponse>, Status>

Delete an Index from a MongoDB Collection Require admins rights

Source

pub async fn delete_package( &mut self, request: impl IntoRequest<DeletePackageRequest>, ) -> Result<Response<DeletePackageResponse>, Status>

Delete an agent Package. Removes the associated file and then delete te package from the agents collection. Requires delete permission on the Package

Trait Implementations§

Source§

impl<T> Clone for FlowServiceClient<T>
where T: Clone,

Source§

fn clone(&self) -> FlowServiceClient<T>

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl<T> Debug for FlowServiceClient<T>
where T: Debug,

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more

Auto Trait Implementations§

§

impl<T> !Freeze for FlowServiceClient<T>

§

impl<T> RefUnwindSafe for FlowServiceClient<T>
where T: RefUnwindSafe,

§

impl<T> Send for FlowServiceClient<T>
where T: Send,

§

impl<T> Sync for FlowServiceClient<T>
where T: Sync,

§

impl<T> Unpin for FlowServiceClient<T>
where T: Unpin,

§

impl<T> UnwindSafe for FlowServiceClient<T>
where T: UnwindSafe,

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> FromRef<T> for T
where T: Clone,

Source§

fn from_ref(input: &T) -> T

Converts to this type from a reference to the input type.
Source§

impl<T> FutureExt for T

Source§

fn with_context(self, otel_cx: Context) -> WithContext<Self>

Attaches the provided Context to this type, returning a WithContext wrapper. Read more
Source§

fn with_current_context(self) -> WithContext<Self>

Attaches the current Context to this type, returning a WithContext wrapper. Read more
Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<T> PolicyExt for T
where T: ?Sized,

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

impl<T> ErasedDestructor for T
where T: 'static,