Skip to main content

FakeProvider

Struct FakeProvider 

Source
pub struct FakeProvider { /* private fields */ }

Implementations§

Source§

impl FakeProvider

Source

pub fn new() -> Self

Source

pub async fn seed_repository( &self, facts: RepositoryFacts, settings: RepositorySettings, )

Source

pub async fn seed_issue(&self, repository: Repository, issue: Issue)

Source

pub async fn seed_change_request( &self, repository: Repository, change_request: ChangeRequest, )

Seeds one change request into the repository it targets.

The head it proposes is change_request.head, which names the repository holding that branch and so can be a fork of repository.

Source

pub async fn seed_check_runs(&self, repository: Repository, runs: Vec<CheckRun>)

Seeds observed checks, each on the commit it names, replacing whatever was already seeded on the commits this call names.

The commit comes from every run’s own head_sha, so no seeded observation can place a run on a commit it does not name.

Source

pub async fn seed_run(&self, repository: Repository, run: WorkflowRun)

Source

pub async fn seed_release(&self, repository: Repository, release: Release)

Source

pub async fn published_checks(&self) -> Vec<(Repository, String, CheckOutcome)>

Source

pub async fn dispatches( &self, ) -> Vec<(Repository, String, String, DispatchInputs)>

Trait Implementations§

Source§

impl Clone for FakeProvider

Source§

fn clone(&self) -> FakeProvider

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl CodeHostingProvider for FakeProvider

Source§

fn repository<'life0, 'life1, 'async_trait>( &'life0 self, repository: &'life1 Repository, ) -> Pin<Box<dyn Future<Output = Result<RepositoryFacts>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn settings<'life0, 'life1, 'async_trait>( &'life0 self, repository: &'life1 Repository, ) -> Pin<Box<dyn Future<Output = Result<RepositorySettings>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn apply_settings<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, repository: &'life1 Repository, settings: &'life2 RepositorySettings, ) -> Pin<Box<dyn Future<Output = Result<RepositorySettings>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn rulesets<'life0, 'life1, 'async_trait>( &'life0 self, repository: &'life1 Repository, ) -> Pin<Box<dyn Future<Output = Result<Vec<Ruleset>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn upsert_ruleset<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, repository: &'life1 Repository, ruleset: &'life2 Ruleset, ) -> Pin<Box<dyn Future<Output = Result<Ruleset>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn put_secret<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, repository: &'life1 Repository, name: &'life2 str, _value: SecretString, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

impl CodeReviewsProvider for FakeProvider

Source§

fn change_request<'life0, 'life1, 'async_trait>( &'life0 self, repository: &'life1 Repository, number: ChangeRequestNumber, ) -> Pin<Box<dyn Future<Output = Result<ChangeRequest>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Reads one complete observation of the change request.
Source§

fn open_change_requests<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, repository: &'life1 Repository, head: &'life2 ChangeRequestHead, ) -> Pin<Box<dyn Future<Output = Result<Vec<ChangeRequestNumber>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Reads the number of every open change request in repository that proposes head. Read more
Source§

fn resolve_thread<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, repository: &'life1 Repository, number: ChangeRequestNumber, thread_id: &'life2 ReviewThreadId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn resolve_finding<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, repository: &'life1 Repository, number: ChangeRequestNumber, thread_id: &'life2 ReviewThreadId, resolution: FindingResolution, reply: &'life3 FindingResolutionReply, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Records why a finding is complete, records its assessed severity and marks its platform thread resolved. Read more
Source§

fn request_reviewers<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, repository: &'life1 Repository, number: ChangeRequestNumber, reviewers: &'life2 [ReviewRequestTarget], ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Adds each target to the outstanding reviewer set. Read more
Source§

fn mark_ready<'life0, 'life1, 'async_trait>( &'life0 self, repository: &'life1 Repository, number: ChangeRequestNumber, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn checks<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, repository: &'life1 Repository, head_sha: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Vec<CheckRun>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Reads the current checks on one commit, completely paginated. Read more
Source§

fn publish_check<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, repository: &'life1 Repository, app_name: &'life2 str, outcome: &'life3 CheckOutcome, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

impl Debug for FakeProvider

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result

Formats the value using the given formatter. Read more
Source§

impl Default for FakeProvider

Source§

fn default() -> FakeProvider

Returns the “default value” for a type. Read more
Source§

impl IssuesProvider for FakeProvider

Source§

fn issue<'life0, 'life1, 'async_trait>( &'life0 self, repository: &'life1 Repository, number: IssueNumber, ) -> Pin<Box<dyn Future<Output = Result<Issue>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn labels<'life0, 'life1, 'async_trait>( &'life0 self, repository: &'life1 Repository, ) -> Pin<Box<dyn Future<Output = Result<Vec<Label>>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn upsert_label<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, repository: &'life1 Repository, label: &'life2 Label, ) -> Pin<Box<dyn Future<Output = Result<Label>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

impl JobsProvider for FakeProvider

Source§

fn dispatch<'life0, 'life1, 'life2, 'life3, 'life4, 'async_trait>( &'life0 self, repository: &'life1 Repository, workflow: &'life2 str, git_ref: &'life3 str, inputs: &'life4 DispatchInputs, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait, 'life4: 'async_trait,

Source§

fn run<'life0, 'life1, 'async_trait>( &'life0 self, repository: &'life1 Repository, run_id: RunId, ) -> Pin<Box<dyn Future<Output = Result<WorkflowRun>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

fn cancel_run<'life0, 'life1, 'async_trait>( &'life0 self, repository: &'life1 Repository, run_id: RunId, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Source§

impl ReleasesProvider for FakeProvider

Source§

fn release_by_tag<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, repository: &'life1 Repository, tag: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<Release>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn create_release<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, repository: &'life1 Repository, release: &'life2 NewRelease, ) -> Pin<Box<dyn Future<Output = Result<Release>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Source§

fn upload_asset<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, repository: &'life1 Repository, release_id: ReleaseId, name: &'life2 str, label: Option<&'life3 str>, upload: AssetUpload, ) -> Pin<Box<dyn Future<Output = Result<ReleaseAsset>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Source§

fn download_asset<'life0, 'life1, 'async_trait>( &'life0 self, repository: &'life1 Repository, asset_id: AssetId, ) -> Pin<Box<dyn Future<Output = Result<AssetStream>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Opens a chunk stream without buffering the complete asset.

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

Creates owned data from borrowed data, usually by cloning. Read more
Source§

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = !

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.