[−][src]Trait ironoxide::group::GroupOps
Required methods
fn group_list(&self) -> Result<GroupListResult>
List all of the groups that the current user is either an admin or member of.
Returns
GroupListResult
List of (abbreviated) metadata about each group the user is a part of.
fn group_create(
&self,
group_create_opts: &GroupCreateOpts
) -> Result<GroupMetaResult>
&self,
group_create_opts: &GroupCreateOpts
) -> Result<GroupMetaResult>
Create a group. The creating user will become a group admin and by default a group member.
Arguments
group_create_opts
- See GroupCreateOpts
. Use the Default
implementation for defaults.
fn group_get_metadata(&self, id: &GroupId) -> Result<GroupGetResult>
Get the full metadata for a specific group given its ID.
Arguments
id
- Unique ID of the group to retrieve
Returns
GroupMetaResult
with details about the requested group.
fn group_delete(&self, id: &GroupId) -> Result<GroupId>
Delete the identified group. Group does not have to be empty of admins/members in order to delete the group. Warning: Deletion of a group will cause all documents encrypted to that group to no longer be decryptable. Caution should be used when deleting groups.
Arguments
id
- Unique id of group
Returns
Deleted group id or error
fn group_update_name(
&self,
id: &GroupId,
name: Option<&GroupName>
) -> Result<GroupMetaResult>
&self,
id: &GroupId,
name: Option<&GroupName>
) -> Result<GroupMetaResult>
Update a group name to a new value or clear its value.
Arguments
id
- ID of the group to updatename
- New name for the group. Provide a Some to update to a new name and a None to clear the name field.
Returns
Result<GroupMetaResult>
Metadata about the group that was updated.
fn group_add_members(
&self,
id: &GroupId,
users: &[UserId]
) -> Result<GroupAccessEditResult>
&self,
id: &GroupId,
users: &[UserId]
) -> Result<GroupAccessEditResult>
Add the users as members of a group.
Arguments
id
- ID of the group to add members tousers
- The list of users thet will be added to the group as members.
Returns
GroupAccessEditResult, which contains all the users that were added. It also contains the users that were not added and the reason they were not.
fn group_remove_members(
&self,
id: &GroupId,
revoke_list: &[UserId]
) -> Result<GroupAccessEditResult>
&self,
id: &GroupId,
revoke_list: &[UserId]
) -> Result<GroupAccessEditResult>
Remove a list of users as members from the group.
Arguments
id
- ID of the group to remove members fromrevoke_list
- List of user IDs to remove as members
Returns
Result<GroupAccessEditResult>
List of users that were removed. Also contains the users that failed to be removed
and the reason they were not.
fn group_add_admins(
&self,
id: &GroupId,
users: &[UserId]
) -> Result<GroupAccessEditResult>
&self,
id: &GroupId,
users: &[UserId]
) -> Result<GroupAccessEditResult>
Add the users as admins of a group.
Arguments
id
- ID of the group to add admins tousers
- The list of users that will be added to the group as admins.
Returns
GroupAccessEditResult, which contains all the users that were added. It also contains the users that were not added and the reason they were not.
fn group_remove_admins(
&self,
id: &GroupId,
revoke_list: &[UserId]
) -> Result<GroupAccessEditResult>
&self,
id: &GroupId,
revoke_list: &[UserId]
) -> Result<GroupAccessEditResult>
Implementors
impl GroupOps for IronOxide
[src]
fn group_list(&self) -> Result<GroupListResult>
[src]
fn group_create(&self, opts: &GroupCreateOpts) -> Result<GroupMetaResult>
[src]
fn group_get_metadata(&self, id: &GroupId) -> Result<GroupGetResult>
[src]
fn group_delete(&self, id: &GroupId) -> Result<GroupId>
[src]
fn group_update_name(
&self,
id: &GroupId,
name: Option<&GroupName>
) -> Result<GroupMetaResult>
[src]
&self,
id: &GroupId,
name: Option<&GroupName>
) -> Result<GroupMetaResult>
fn group_add_members(
&self,
id: &GroupId,
grant_list: &[UserId]
) -> Result<GroupAccessEditResult>
[src]
&self,
id: &GroupId,
grant_list: &[UserId]
) -> Result<GroupAccessEditResult>
fn group_remove_members(
&self,
id: &GroupId,
revoke_list: &[UserId]
) -> Result<GroupAccessEditResult>
[src]
&self,
id: &GroupId,
revoke_list: &[UserId]
) -> Result<GroupAccessEditResult>
fn group_add_admins(
&self,
id: &GroupId,
users: &[UserId]
) -> Result<GroupAccessEditResult>
[src]
&self,
id: &GroupId,
users: &[UserId]
) -> Result<GroupAccessEditResult>
fn group_remove_admins(
&self,
id: &GroupId,
revoke_list: &[UserId]
) -> Result<GroupAccessEditResult>
[src]
&self,
id: &GroupId,
revoke_list: &[UserId]
) -> Result<GroupAccessEditResult>