pub struct Client<A> {
api: A,
caller: Option<Caller>,
}Expand description
A typed GitHub backend over an injected API implementation.
Fields§
§api: A§caller: Option<Caller>Implementations§
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_access( &self, repository: &RepoRef, config: Option<&Access<Permission>>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn read_caller( &self, organization: &str, ) -> Result<Caller, ForgeError>
pub(super) async fn apply_access( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_actions( &self, repository: &RepoRef, config: Option<&Actions>, live: &mut Live, ) -> Result<(), ForgeError>
async fn read_group<G: ActionsGroup>( &self, repository: &RepoRef, declared: Option<&G>, live: &mut ActionsLive, ) -> Result<(), ForgeError>
pub(super) async fn apply_actions( &self, repository: &RepoRef, group: &Group, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_autolinks( &self, repository: &RepoRef, config: Option<&Autolinks>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_autolinks( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_custom_properties( &self, repository: &RepoRef, config: Option<&BTreeMap<String, PropertyValue>>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_custom_properties( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_environments( &self, repository: &RepoRef, config: Option<&Environments>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_environments( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_labels( &self, repository: &RepoRef, config: Option<&Labels<Label>>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_labels( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_pages( &self, repository: &RepoRef, config: Option<&Pages>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_pages( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_repository( &self, repository: &RepoRef, config: &Repository, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_repository( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_rulesets( &self, repository: &RepoRef, config: Option<&Rulesets>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_rulesets( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_security( &self, repository: &RepoRef, config: &Security, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_security( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_variables( &self, repository: &RepoRef, config: Option<&Variables>, environments: Option<&Environments>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_variables( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Source§impl<A: Api> Client<A>
impl<A: Api> Client<A>
pub(super) async fn read_webhooks( &self, repository: &RepoRef, config: Option<&Webhooks>, live: &mut Live, ) -> Result<(), ForgeError>
pub(super) async fn apply_webhooks( &self, repository: &RepoRef, operation: &Operation, ) -> Result<(), ForgeError>
Trait Implementations§
Source§impl<A: Api> Backend for Client<A>
impl<A: Api> Backend for Client<A>
Source§type Error = ForgeError
type Error = ForgeError
The adapter’s transport or API error.
Source§type Operation = Operation
type Operation = Operation
One labelled write. The label names the resource the write changes.
Source§fn validate(config: &Config) -> Result<(), Self::Error>
fn validate(config: &Config) -> Result<(), Self::Error>
Check a configuration before any network access. Read more
Source§async fn read(
&self,
repository: &RepoRef,
config: &Config,
) -> Result<Live, Self::Error>
async fn read( &self, repository: &RepoRef, config: &Config, ) -> Result<Live, Self::Error>
Read the state that planning compares with
config.Auto Trait Implementations§
impl<A> Freeze for Client<A>where
A: Freeze,
impl<A> RefUnwindSafe for Client<A>where
A: RefUnwindSafe,
impl<A> Send for Client<A>where
A: Send,
impl<A> Sync for Client<A>where
A: Sync,
impl<A> Unpin for Client<A>where
A: Unpin,
impl<A> UnsafeUnpin for Client<A>where
A: UnsafeUnpin,
impl<A> UnwindSafe for Client<A>where
A: UnwindSafe,
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more