pub struct DomainClient {
pub client_id: String,
/* private fields */
}Fields§
§client_id: StringImplementations§
Source§impl DomainClient
impl DomainClient
pub fn new(api_url: &str, dds_url: &str, client_id: &str) -> Self
pub async fn new_with_app_credential( api_url: &str, dds_url: &str, client_id: &str, app_key: &str, app_secret: &str, ) -> Result<Self, DomainError>
pub async fn new_with_user_credential( api_url: &str, dds_url: &str, client_id: &str, email: &str, password: &str, remember_password: bool, ) -> Result<Self, DomainError>
pub fn with_oidc_access_token(&self, token: &str) -> Self
pub async fn download_domain_data_stream( &self, domain_id: &str, query: &DownloadQuery, ) -> Result<Receiver<Result<DomainData, DomainError>>, DomainError>
pub async fn download_domain_data( &self, domain_id: &str, query: &DownloadQuery, ) -> Result<Vec<DomainData>, DomainError>
pub async fn upload_domain_data_stream( &self, domain_id: &str, data: Receiver<UploadDomainData>, ) -> Result<Vec<DomainDataMetadata>, DomainError>
pub async fn upload_domain_data( &self, domain_id: &str, data: Vec<UploadDomainData>, ) -> Result<Vec<DomainDataMetadata>, DomainError>
pub async fn download_metadata( &self, domain_id: &str, query: &DownloadQuery, ) -> Result<Vec<DomainDataMetadata>, DomainError>
pub async fn download_domain_data_by_id( &self, domain_id: &str, id: &str, ) -> Result<Vec<u8>, DomainError>
pub async fn delete_domain_data_by_id( &self, domain_id: &str, id: &str, ) -> Result<(), DomainError>
pub async fn submit_job_request_v1( &self, domain_id: &str, request: &JobRequest, ) -> Result<Response, DomainError>
Sourcepub async fn list_domains(
&self,
query: &ListDomainsQuery,
) -> Result<ListDomainsResponse, DomainError>
pub async fn list_domains( &self, query: &ListDomainsQuery, ) -> Result<ListDomainsResponse, DomainError>
Lists domains the caller has access to.
§Arguments
query- TheListDomainsQueryobject containing the query parameters.
- org: (required) The organization to list domains from:
- “own”: returns domains in your own organization.
- a UUID: returns domains in that specific organization.
- “all”: returns domains across all organizations. When filtering by ‘portal’ (see below), this works without restrictions. Otherwise, ‘domain_server_id’ is required and the domain server must belong to your org. Not available for app tokens without a portal filter.
- portal_id: (optional) Full UUID of a portal to filter domains. Mutually exclusive with ‘portal_short_id’.
- portal_short_id: (optional) Short ID of a portal to filter domains. Mutually exclusive with ‘portal_id’.
- domain_server_id: (optional) UUID of the domain server to filter domains. Ignored if a portal filter is active.
§Returns
ListDomainsResponse- The list of domains the caller has access to.
pub async fn create_domain( &self, name: &str, domain_server_id: Option<String>, domain_server_url: Option<String>, redirect_url: Option<String>, ) -> Result<DomainWithToken, DomainError>
pub async fn delete_domain(&self, domain_id: &str) -> Result<(), DomainError>
Trait Implementations§
Source§impl Clone for DomainClient
impl Clone for DomainClient
Source§fn clone(&self) -> DomainClient
fn clone(&self) -> DomainClient
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for DomainClient
impl !RefUnwindSafe for DomainClient
impl Send for DomainClient
impl Sync for DomainClient
impl Unpin for DomainClient
impl UnsafeUnpin for DomainClient
impl !UnwindSafe for DomainClient
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
Mutably borrows from an owned value. Read more