[][src]Trait em_client::Api

pub trait Api {
    type Error;
    fn create_account(
        &self,
        body: AccountRequest
    ) -> Result<Account, Self::Error>;
fn delete_account(&self, account_id: Uuid) -> Result<(), Self::Error>;
fn get_account(&self, account_id: Uuid) -> Result<Account, Self::Error>;
fn get_accounts(&self) -> Result<AccountListResponse, Self::Error>;
fn select_account(&self, account_id: Uuid) -> Result<(), Self::Error>;
fn update_account(
        &self,
        account_id: Uuid,
        body: AccountUpdateRequest
    ) -> Result<Account, Self::Error>;
fn add_application(&self, body: AppRequest) -> Result<App, Self::Error>;
fn get_all_apps(
        &self,
        name: Option<String>,
        description: Option<String>,
        all_search: Option<String>,
        limit: Option<i32>,
        offset: Option<i32>,
        sort_by: Option<String>
    ) -> Result<GetAllAppsResponse, Self::Error>;
fn get_app(&self, app_id: Uuid) -> Result<App, Self::Error>;
fn get_app_certificate(
        &self,
        node_id: Uuid,
        app_id: Uuid
    ) -> Result<Certificate, Self::Error>;
fn get_app_node_certificate_details(
        &self,
        node_id: Uuid,
        app_id: Uuid
    ) -> Result<CertificateDetails, Self::Error>;
fn update_app(
        &self,
        app_id: Uuid,
        body: AppBodyUpdateRequest
    ) -> Result<App, Self::Error>;
fn authenticate_user(&self) -> Result<AuthResponse, Self::Error>;
fn convert_app_build(
        &self,
        body: ConvertAppBuildRequest
    ) -> Result<Build, Self::Error>;
fn create_build(
        &self,
        body: CreateBuildRequest
    ) -> Result<Build, Self::Error>;
fn delete_build(&self, build_id: Uuid) -> Result<(), Self::Error>;
fn get_all_builds(
        &self,
        all_search: Option<String>,
        docker_image_name: Option<String>,
        deployed_status: Option<String>,
        status: Option<String>,
        limit: Option<i32>,
        offset: Option<i32>,
        sort_by: Option<String>
    ) -> Result<GetAllBuildsResponse, Self::Error>;
fn get_build(&self, build_id: Uuid) -> Result<Build, Self::Error>;
fn get_build_deployments(
        &self,
        build_id: Uuid,
        status: Option<String>,
        all_search: Option<String>,
        sort_by: Option<String>,
        limit: Option<i32>,
        offset: Option<i32>
    ) -> Result<GetAllBuildDeploymentsResponse, Self::Error>;
fn get_certificate(&self, cert_id: Uuid) -> Result<Certificate, Self::Error>;
fn deactivate_node(&self, node_id: Uuid) -> Result<(), Self::Error>;
fn get_all_nodes(
        &self,
        name: Option<String>,
        description: Option<String>,
        sgx_version: Option<String>,
        all_search: Option<String>,
        status: Option<String>,
        limit: Option<i32>,
        offset: Option<i32>,
        sort_by: Option<String>
    ) -> Result<GetAllNodesResponse, Self::Error>;
fn get_node(&self, node_id: Uuid) -> Result<Node, Self::Error>;
fn get_node_certificate(
        &self,
        node_id: Uuid
    ) -> Result<Certificate, Self::Error>;
fn get_node_certificate_details(
        &self,
        node_id: Uuid
    ) -> Result<CertificateDetails, Self::Error>;
fn get_manager_version(&self) -> Result<VersionResponse, Self::Error>;
fn get_all_tasks(
        &self,
        task_type: Option<String>,
        status: Option<String>,
        requester: Option<String>,
        approver: Option<String>,
        all_search: Option<String>,
        limit: Option<i32>,
        offset: Option<i32>,
        sort_by: Option<String>,
        base_filters: Option<String>
    ) -> Result<GetAllTasksResponse, Self::Error>;
fn get_task(&self, task_id: Uuid) -> Result<Task, Self::Error>;
fn get_task_status(&self, task_id: Uuid) -> Result<TaskResult, Self::Error>;
fn update_task(
        &self,
        task_id: Uuid,
        body: TaskUpdateRequest
    ) -> Result<TaskResult, Self::Error>;
fn convert_app(
        &self,
        body: ConversionRequest
    ) -> Result<ConversionResponse, Self::Error>;
fn blacklist_user(
        &self,
        body: UserBlacklistRequest
    ) -> Result<(), Self::Error>;
fn change_password(
        &self,
        body: PasswordChangeRequest
    ) -> Result<(), Self::Error>;
fn confirm_email(
        &self,
        body: ConfirmEmailRequest
    ) -> Result<ConfirmEmailResponse, Self::Error>;
fn create_user(&self, body: SignupRequest) -> Result<User, Self::Error>;
fn delete_user_from_account(&self, user_id: Uuid) -> Result<(), Self::Error>;
fn forgot_password(
        &self,
        body: ForgotPasswordRequest
    ) -> Result<(), Self::Error>;
fn get_all_users(
        &self,
        all_search: Option<String>,
        limit: Option<i32>,
        offset: Option<i32>,
        sort_by: Option<String>
    ) -> Result<GetAllUsersResponse, Self::Error>;
fn get_logged_in_user(&self) -> Result<User, Self::Error>;
fn get_user(&self, user_id: Uuid) -> Result<User, Self::Error>;
fn invite_user(&self, body: InviteUserRequest) -> Result<User, Self::Error>;
fn process_invitations(
        &self,
        body: ProcessInviteRequest
    ) -> Result<(), Self::Error>;
fn resend_confirm_email(&self) -> Result<(), Self::Error>;
fn resend_invitation(&self, user_id: Uuid) -> Result<(), Self::Error>;
fn reset_password(
        &self,
        user_id: Uuid,
        body: PasswordResetRequest
    ) -> Result<(), Self::Error>;
fn update_user(
        &self,
        user_id: Uuid,
        body: UpdateUserRequest
    ) -> Result<User, Self::Error>;
fn validate_password_reset_token(
        &self,
        user_id: Uuid,
        body: ValidateTokenRequest
    ) -> Result<ValidateTokenResponse, Self::Error>;
fn whitelist_user(
        &self,
        user_id: Uuid,
        user_token: Option<String>
    ) -> Result<User, Self::Error>;
fn get_zone(&self, zone_id: Uuid) -> Result<Zone, Self::Error>;
fn get_zone_join_token(
        &self,
        zone_id: Uuid
    ) -> Result<ZoneJoinToken, Self::Error>;
fn get_zones(&self) -> Result<Vec<Zone>, Self::Error>; }

Associated Types

type Error

Loading content...

Required methods

fn create_account(&self, body: AccountRequest) -> Result<Account, Self::Error>

Create a new account

fn delete_account(&self, account_id: Uuid) -> Result<(), Self::Error>

Delete account

fn get_account(&self, account_id: Uuid) -> Result<Account, Self::Error>

Get a specific account

fn get_accounts(&self) -> Result<AccountListResponse, Self::Error>

Get all accounts

fn select_account(&self, account_id: Uuid) -> Result<(), Self::Error>

Select a user's account to work on

fn update_account(
    &self,
    account_id: Uuid,
    body: AccountUpdateRequest
) -> Result<Account, Self::Error>

Update account

fn add_application(&self, body: AppRequest) -> Result<App, Self::Error>

Add an application

fn get_all_apps(
    &self,
    name: Option<String>,
    description: Option<String>,
    all_search: Option<String>,
    limit: Option<i32>,
    offset: Option<i32>,
    sort_by: Option<String>
) -> Result<GetAllAppsResponse, Self::Error>

Get all apps information

fn get_app(&self, app_id: Uuid) -> Result<App, Self::Error>

Get details of a particular app

fn get_app_certificate(
    &self,
    node_id: Uuid,
    app_id: Uuid
) -> Result<Certificate, Self::Error>

Get an attested app's certificate

fn get_app_node_certificate_details(
    &self,
    node_id: Uuid,
    app_id: Uuid
) -> Result<CertificateDetails, Self::Error>

Get an App's Certificate for a Node

fn update_app(
    &self,
    app_id: Uuid,
    body: AppBodyUpdateRequest
) -> Result<App, Self::Error>

Update details of a particular app

fn authenticate_user(&self) -> Result<AuthResponse, Self::Error>

Non OAuth based User authentication

fn convert_app_build(
    &self,
    body: ConvertAppBuildRequest
) -> Result<Build, Self::Error>

Convert a docker image and create a new build

fn create_build(&self, body: CreateBuildRequest) -> Result<Build, Self::Error>

Create a new build

fn delete_build(&self, build_id: Uuid) -> Result<(), Self::Error>

Delete a particular build

fn get_all_builds(
    &self,
    all_search: Option<String>,
    docker_image_name: Option<String>,
    deployed_status: Option<String>,
    status: Option<String>,
    limit: Option<i32>,
    offset: Option<i32>,
    sort_by: Option<String>
) -> Result<GetAllBuildsResponse, Self::Error>

Get all builds information

fn get_build(&self, build_id: Uuid) -> Result<Build, Self::Error>

Get details of a particular build

fn get_build_deployments(
    &self,
    build_id: Uuid,
    status: Option<String>,
    all_search: Option<String>,
    sort_by: Option<String>,
    limit: Option<i32>,
    offset: Option<i32>
) -> Result<GetAllBuildDeploymentsResponse, Self::Error>

Get all deployments of a build

fn get_certificate(&self, cert_id: Uuid) -> Result<Certificate, Self::Error>

Retrieve a certificate

fn deactivate_node(&self, node_id: Uuid) -> Result<(), Self::Error>

Deactivate a particular node

fn get_all_nodes(
    &self,
    name: Option<String>,
    description: Option<String>,
    sgx_version: Option<String>,
    all_search: Option<String>,
    status: Option<String>,
    limit: Option<i32>,
    offset: Option<i32>,
    sort_by: Option<String>
) -> Result<GetAllNodesResponse, Self::Error>

Get all nodes information

fn get_node(&self, node_id: Uuid) -> Result<Node, Self::Error>

Get details of a particular node

fn get_node_certificate(
    &self,
    node_id: Uuid
) -> Result<Certificate, Self::Error>

Get an attested node's certificate

fn get_node_certificate_details(
    &self,
    node_id: Uuid
) -> Result<CertificateDetails, Self::Error>

Get an node's certificate

fn get_manager_version(&self) -> Result<VersionResponse, Self::Error>

Get Manager Version

fn get_all_tasks(
    &self,
    task_type: Option<String>,
    status: Option<String>,
    requester: Option<String>,
    approver: Option<String>,
    all_search: Option<String>,
    limit: Option<i32>,
    offset: Option<i32>,
    sort_by: Option<String>,
    base_filters: Option<String>
) -> Result<GetAllTasksResponse, Self::Error>

Get all the tasks

fn get_task(&self, task_id: Uuid) -> Result<Task, Self::Error>

Get details of a particular task

fn get_task_status(&self, task_id: Uuid) -> Result<TaskResult, Self::Error>

Get status and result of a particular task

fn update_task(
    &self,
    task_id: Uuid,
    body: TaskUpdateRequest
) -> Result<TaskResult, Self::Error>

Update status of approver and task

fn convert_app(
    &self,
    body: ConversionRequest
) -> Result<ConversionResponse, Self::Error>

Convert an application to run in EnclaveOS

fn blacklist_user(&self, body: UserBlacklistRequest) -> Result<(), Self::Error>

Disable a user using its email

fn change_password(
    &self,
    body: PasswordChangeRequest
) -> Result<(), Self::Error>

Change user password

fn confirm_email(
    &self,
    body: ConfirmEmailRequest
) -> Result<ConfirmEmailResponse, Self::Error>

Confirms user's email address

fn create_user(&self, body: SignupRequest) -> Result<User, Self::Error>

Create a new user

fn delete_user_from_account(&self, user_id: Uuid) -> Result<(), Self::Error>

Removed user's association with an account

fn forgot_password(
    &self,
    body: ForgotPasswordRequest
) -> Result<(), Self::Error>

Initiate password reset sequence for a user

fn get_all_users(
    &self,
    all_search: Option<String>,
    limit: Option<i32>,
    offset: Option<i32>,
    sort_by: Option<String>
) -> Result<GetAllUsersResponse, Self::Error>

Get all users information

fn get_logged_in_user(&self) -> Result<User, Self::Error>

Get details of the current logged in user

fn get_user(&self, user_id: Uuid) -> Result<User, Self::Error>

Get details of a particular User

fn invite_user(&self, body: InviteUserRequest) -> Result<User, Self::Error>

Invite a user

fn process_invitations(
    &self,
    body: ProcessInviteRequest
) -> Result<(), Self::Error>

Process a user's pending account invitations

fn resend_confirm_email(&self) -> Result<(), Self::Error>

Resend email with link to confirm user's email address

fn resend_invitation(&self, user_id: Uuid) -> Result<(), Self::Error>

Resend invite to the user to join a specific account

fn reset_password(
    &self,
    user_id: Uuid,
    body: PasswordResetRequest
) -> Result<(), Self::Error>

Reset a user's password

fn update_user(
    &self,
    user_id: Uuid,
    body: UpdateUserRequest
) -> Result<User, Self::Error>

Update status, name, role of a user. User with MANAGER access role can only update another user

fn validate_password_reset_token(
    &self,
    user_id: Uuid,
    body: ValidateTokenRequest
) -> Result<ValidateTokenResponse, Self::Error>

Validates password reset token for the user

fn whitelist_user(
    &self,
    user_id: Uuid,
    user_token: Option<String>
) -> Result<User, Self::Error>

Whitelist a user

fn get_zone(&self, zone_id: Uuid) -> Result<Zone, Self::Error>

Get zone details

fn get_zone_join_token(
    &self,
    zone_id: Uuid
) -> Result<ZoneJoinToken, Self::Error>

Get authentication token

fn get_zones(&self) -> Result<Vec<Zone>, Self::Error>

Get all zones

Loading content...

Implementations on Foreign Types

impl<T, E> Api for RefCell<T> where
    T: ApiMut<Error = E>, 
[src]

type Error = E

Loading content...

Implementors

impl<T, E> Api for T where
    T: AccountsApi<Error = E> + AppApi<Error = E> + AuthApi<Error = E> + BuildApi<Error = E> + CertificateApi<Error = E> + NodeApi<Error = E> + SystemApi<Error = E> + TaskApi<Error = E> + ToolsApi<Error = E> + UsersApi<Error = E> + ZoneApi<Error = E>, 
[src]

type Error = E

Loading content...