pub struct GutsClient { /* private fields */ }Expand description
Client for interacting with the Guts API during migration.
Implementations§
Source§impl GutsClient
impl GutsClient
Sourcepub fn new(base_url: impl Into<String>, token: Option<String>) -> Result<Self>
pub fn new(base_url: impl Into<String>, token: Option<String>) -> Result<Self>
Create a new Guts client.
Sourcepub async fn create_repo(
&self,
name: &str,
description: Option<&str>,
private: bool,
) -> Result<RepoResponse>
pub async fn create_repo( &self, name: &str, description: Option<&str>, private: bool, ) -> Result<RepoResponse>
Create a repository on Guts.
Sourcepub async fn get_repo(&self, owner: &str, name: &str) -> Result<RepoResponse>
pub async fn get_repo(&self, owner: &str, name: &str) -> Result<RepoResponse>
Get repository information.
Sourcepub async fn create_issue(
&self,
owner: &str,
repo: &str,
request: &CreateIssueRequest,
) -> Result<IssueResponse>
pub async fn create_issue( &self, owner: &str, repo: &str, request: &CreateIssueRequest, ) -> Result<IssueResponse>
Create an issue.
Sourcepub async fn close_issue(
&self,
owner: &str,
repo: &str,
number: u64,
) -> Result<IssueResponse>
pub async fn close_issue( &self, owner: &str, repo: &str, number: u64, ) -> Result<IssueResponse>
Close an issue.
Sourcepub async fn create_issue_comment(
&self,
owner: &str,
repo: &str,
number: u64,
body: &str,
) -> Result<()>
pub async fn create_issue_comment( &self, owner: &str, repo: &str, number: u64, body: &str, ) -> Result<()>
Create a comment on an issue.
Sourcepub async fn create_pull_request(
&self,
owner: &str,
repo: &str,
request: &CreatePullRequestRequest,
) -> Result<PullRequestResponse>
pub async fn create_pull_request( &self, owner: &str, repo: &str, request: &CreatePullRequestRequest, ) -> Result<PullRequestResponse>
Create a pull request.
Sourcepub async fn create_pr_comment(
&self,
owner: &str,
repo: &str,
number: u64,
body: &str,
) -> Result<()>
pub async fn create_pr_comment( &self, owner: &str, repo: &str, number: u64, body: &str, ) -> Result<()>
Create a comment on a pull request.
Sourcepub async fn create_release(
&self,
owner: &str,
repo: &str,
request: &CreateReleaseRequest,
) -> Result<ReleaseResponse>
pub async fn create_release( &self, owner: &str, repo: &str, request: &CreateReleaseRequest, ) -> Result<ReleaseResponse>
Create a release.
Sourcepub async fn upload_release_asset(
&self,
owner: &str,
repo: &str,
release_id: &str,
name: &str,
content_type: &str,
data: Vec<u8>,
) -> Result<()>
pub async fn upload_release_asset( &self, owner: &str, repo: &str, release_id: &str, name: &str, content_type: &str, data: Vec<u8>, ) -> Result<()>
Upload a release asset.
Sourcepub async fn create_label(
&self,
owner: &str,
repo: &str,
name: &str,
color: &str,
description: Option<&str>,
) -> Result<()>
pub async fn create_label( &self, owner: &str, repo: &str, name: &str, color: &str, description: Option<&str>, ) -> Result<()>
Create a label.
Sourcepub async fn health_check(&self) -> Result<bool>
pub async fn health_check(&self) -> Result<bool>
Check if the Guts node is healthy.
Auto Trait Implementations§
impl !RefUnwindSafe for GutsClient
impl !UnwindSafe for GutsClient
impl Freeze for GutsClient
impl Send for GutsClient
impl Sync for GutsClient
impl Unpin for GutsClient
impl UnsafeUnpin for GutsClient
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