Skip to main content

AccessApi

Trait AccessApi 

Source
pub trait AccessApi {
Show 13 methods // Required methods fn add_collaborator( &self, repository: &RepoRef, user: &UserName, permission: &Permission, ) -> impl Future<Output = Result<(), ForgeError>> + Send; fn add_team( &self, repository: &RepoRef, slug: &str, permission: &Permission, ) -> impl Future<Output = Result<(), ForgeError>> + Send; fn cancel_invitation( &self, repository: &RepoRef, id: u64, ) -> impl Future<Output = Result<(), ForgeError>> + Send; fn collaborators( &self, repository: &RepoRef, ) -> impl Future<Output = Result<Vec<Collaborator>, ForgeError>> + Send; fn current_user( &self, ) -> impl Future<Output = Result<String, ForgeError>> + Send; fn invitations( &self, repository: &RepoRef, ) -> impl Future<Output = Result<Vec<Invitation>, ForgeError>> + Send; fn organization_teams( &self, organization: &str, ) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send; fn owner_kind( &self, owner: &str, ) -> impl Future<Output = Result<OwnerKind, ForgeError>> + Send; fn remove_collaborator( &self, repository: &RepoRef, user: &UserName, ) -> impl Future<Output = Result<(), ForgeError>> + Send; fn remove_team( &self, repository: &RepoRef, slug: &str, ) -> impl Future<Output = Result<(), ForgeError>> + Send; fn teams( &self, repository: &RepoRef, ) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send; fn update_invitation( &self, repository: &RepoRef, id: u64, permission: &Permission, ) -> impl Future<Output = Result<(), ForgeError>> + Send; fn user_teams( &self, ) -> impl Future<Output = Result<Vec<Membership>, ForgeError>> + Send;
}
Expand description

The access operations of the GitHub API.

Required Methods§

Source

fn add_collaborator( &self, repository: &RepoRef, user: &UserName, permission: &Permission, ) -> impl Future<Output = Result<(), ForgeError>> + Send

Grant user the given permission, which invites them if needed.

Source

fn add_team( &self, repository: &RepoRef, slug: &str, permission: &Permission, ) -> impl Future<Output = Result<(), ForgeError>> + Send

Grant the team with this slug the given permission on the repository.

Source

fn cancel_invitation( &self, repository: &RepoRef, id: u64, ) -> impl Future<Output = Result<(), ForgeError>> + Send

Cancel the pending invitation id.

Source

fn collaborators( &self, repository: &RepoRef, ) -> impl Future<Output = Result<Vec<Collaborator>, ForgeError>> + Send

Read the repository’s direct collaborators, without inherited access.

Source

fn current_user( &self, ) -> impl Future<Output = Result<String, ForgeError>> + Send

Read the login of the authenticated user.

Source

fn invitations( &self, repository: &RepoRef, ) -> impl Future<Output = Result<Vec<Invitation>, ForgeError>> + Send

Read the repository’s pending invitations.

Source

fn organization_teams( &self, organization: &str, ) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send

Read the teams available for assignment at organization.

Source

fn owner_kind( &self, owner: &str, ) -> impl Future<Output = Result<OwnerKind, ForgeError>> + Send

Read whether owner is an organization or a personal account.

Source

fn remove_collaborator( &self, repository: &RepoRef, user: &UserName, ) -> impl Future<Output = Result<(), ForgeError>> + Send

Remove user’s direct grant on the repository.

Source

fn remove_team( &self, repository: &RepoRef, slug: &str, ) -> impl Future<Output = Result<(), ForgeError>> + Send

Remove the direct grant of the team with this slug on the repository.

Source

fn teams( &self, repository: &RepoRef, ) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send

Read the repository’s current direct team grants.

Source

fn update_invitation( &self, repository: &RepoRef, id: u64, permission: &Permission, ) -> impl Future<Output = Result<(), ForgeError>> + Send

Change the permission of the pending invitation id.

Source

fn user_teams( &self, ) -> impl Future<Output = Result<Vec<Membership>, ForgeError>> + Send

Read the teams the authenticated user belongs to, in any organization.

Dyn Compatibility§

This trait is not dyn compatible.

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

Implementors§