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: WorkspaceRid,
    ) -> 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: WorkspaceRid, ) -> Result<Workspace, Error>

Gets 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. It may not be present if the user does not have access to any workspaces or no default workspace is configured for the user’s organization.

Implementors§