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§
Sourcefn add_collaborator(
&self,
repository: &RepoRef,
user: &UserName,
permission: &Permission,
) -> impl Future<Output = Result<(), ForgeError>> + Send
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.
Sourcefn add_team(
&self,
repository: &RepoRef,
slug: &str,
permission: &Permission,
) -> impl Future<Output = Result<(), ForgeError>> + Send
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.
Sourcefn cancel_invitation(
&self,
repository: &RepoRef,
id: u64,
) -> impl Future<Output = Result<(), ForgeError>> + Send
fn cancel_invitation( &self, repository: &RepoRef, id: u64, ) -> impl Future<Output = Result<(), ForgeError>> + Send
Cancel the pending invitation id.
Sourcefn collaborators(
&self,
repository: &RepoRef,
) -> impl Future<Output = Result<Vec<Collaborator>, ForgeError>> + Send
fn collaborators( &self, repository: &RepoRef, ) -> impl Future<Output = Result<Vec<Collaborator>, ForgeError>> + Send
Read the repository’s direct collaborators, without inherited access.
Sourcefn current_user(
&self,
) -> impl Future<Output = Result<String, ForgeError>> + Send
fn current_user( &self, ) -> impl Future<Output = Result<String, ForgeError>> + Send
Read the login of the authenticated user.
Sourcefn invitations(
&self,
repository: &RepoRef,
) -> impl Future<Output = Result<Vec<Invitation>, ForgeError>> + Send
fn invitations( &self, repository: &RepoRef, ) -> impl Future<Output = Result<Vec<Invitation>, ForgeError>> + Send
Read the repository’s pending invitations.
Sourcefn organization_teams(
&self,
organization: &str,
) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send
fn organization_teams( &self, organization: &str, ) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send
Read the teams available for assignment at organization.
Sourcefn owner_kind(
&self,
owner: &str,
) -> impl Future<Output = Result<OwnerKind, ForgeError>> + Send
fn owner_kind( &self, owner: &str, ) -> impl Future<Output = Result<OwnerKind, ForgeError>> + Send
Read whether owner is an organization or a personal account.
Sourcefn remove_collaborator(
&self,
repository: &RepoRef,
user: &UserName,
) -> impl Future<Output = Result<(), ForgeError>> + Send
fn remove_collaborator( &self, repository: &RepoRef, user: &UserName, ) -> impl Future<Output = Result<(), ForgeError>> + Send
Remove user’s direct grant on the repository.
Sourcefn remove_team(
&self,
repository: &RepoRef,
slug: &str,
) -> impl Future<Output = Result<(), ForgeError>> + Send
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.
Sourcefn teams(
&self,
repository: &RepoRef,
) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send
fn teams( &self, repository: &RepoRef, ) -> impl Future<Output = Result<Vec<Team>, ForgeError>> + Send
Read the repository’s current direct team grants.
Sourcefn update_invitation(
&self,
repository: &RepoRef,
id: u64,
permission: &Permission,
) -> impl Future<Output = Result<(), ForgeError>> + Send
fn update_invitation( &self, repository: &RepoRef, id: u64, permission: &Permission, ) -> impl Future<Output = Result<(), ForgeError>> + Send
Change the permission of the pending invitation id.
Sourcefn user_teams(
&self,
) -> impl Future<Output = Result<Vec<Membership>, ForgeError>> + Send
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".