Skip to main content

WorkspaceService

Trait WorkspaceService 

Source
pub trait WorkspaceService {
    // Required methods
    fn get_workspaces(
        &self,
        auth_: BearerToken,
    ) -> Result<BTreeSet<Workspace>, Error>;
    fn get_workspace(
        &self,
        auth_: BearerToken,
        workspace_rid: ResourceIdentifier,
    ) -> Result<Workspace, Error>;
    fn update_workspace(
        &self,
        auth_: BearerToken,
        rid: ResourceIdentifier,
        request: UpdateWorkspaceRequest,
    ) -> Result<Workspace, Error>;
    fn get_default_workspace(
        &self,
        auth_: BearerToken,
    ) -> Result<Option<Workspace>, Error>;
}
Expand description

This service provides information about workspaces. Workspaces provide access control boundaries. All resources in Nominal live within a workspace.

Required Methods§

Source

fn get_workspaces( &self, auth_: BearerToken, ) -> Result<BTreeSet<Workspace>, Error>

Gets all workspaces that the requesting user belongs to.

Source

fn get_workspace( &self, auth_: BearerToken, workspace_rid: ResourceIdentifier, ) -> Result<Workspace, Error>

Gets the workspace with the specified WorkspaceRid.

Source

fn update_workspace( &self, auth_: BearerToken, rid: ResourceIdentifier, request: UpdateWorkspaceRequest, ) -> Result<Workspace, Error>

Updates the settings of the workspace with the specified WorkspaceRid.

Source

fn get_default_workspace( &self, auth_: BearerToken, ) -> Result<Option<Workspace>, Error>

Gets the default workspace for the requesting user. If the user belongs to a single workspace, that workspace is returned. Otherwise, if the user’s organization has a default workspace and the user belongs to it, that will be returned.

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§