Skip to main content

WorkspaceService

Trait WorkspaceService 

Source
pub trait WorkspaceService<I>
where I: Iterator<Item = Result<Bytes, Error>>,
{ // Required methods fn get_workspaces( &self, auth_: &BearerToken, filter_by_session_org: Option<bool>, include_guest_workspaces: Option<bool>, ) -> Result<BTreeSet<Workspace>, Error>; fn get_workspace( &self, auth_: &BearerToken, workspace_rid: &WorkspaceRid, ) -> Result<Workspace, Error>; fn update_workspace( &self, auth_: &BearerToken, rid: &WorkspaceRid, 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, filter_by_session_org: Option<bool>, include_guest_workspaces: Option<bool>, ) -> Result<BTreeSet<Workspace>, Error>

Gets all workspaces that the requesting user belongs to. Filters results to workspaces in the user’s session org, unless otherwise specified.

Source

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

Gets the workspace with the specified WorkspaceRid. Throws if the requesting user does not have access to the workspace based on their current session.

Source

fn update_workspace( &self, auth_: &BearerToken, rid: &WorkspaceRid, 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§

Source§

impl<I, __C> WorkspaceService<I> for WorkspaceServiceClient<__C>
where I: Iterator<Item = Result<Bytes, Error>>, __C: Client<ResponseBody = I>,