pub struct GitManager<'a> { /* private fields */ }Expand description
Manager for Git operations
Implementations§
Source§impl<'a> GitManager<'a>
impl<'a> GitManager<'a>
Sourcepub fn new(client: &'a DaytonaClient) -> Self
pub fn new(client: &'a DaytonaClient) -> Self
Create a new Git manager
Sourcepub async fn clone(
&self,
sandbox_id: &Uuid,
request: GitCloneRequest,
) -> Result<()>
pub async fn clone( &self, sandbox_id: &Uuid, request: GitCloneRequest, ) -> Result<()>
Clone a repository into a sandbox
Sourcepub async fn commit(
&self,
sandbox_id: &Uuid,
request: GitCommitRequest,
) -> Result<String>
pub async fn commit( &self, sandbox_id: &Uuid, request: GitCommitRequest, ) -> Result<String>
Commit changes
Sourcepub async fn push(
&self,
sandbox_id: &Uuid,
path: &str,
request: GitPushRequest,
) -> Result<()>
pub async fn push( &self, sandbox_id: &Uuid, path: &str, request: GitPushRequest, ) -> Result<()>
Push changes to remote
Sourcepub async fn pull(
&self,
sandbox_id: &Uuid,
path: &str,
request: GitPullRequest,
) -> Result<()>
pub async fn pull( &self, sandbox_id: &Uuid, path: &str, request: GitPullRequest, ) -> Result<()>
Pull changes from remote
Sourcepub async fn history(
&self,
sandbox_id: &Uuid,
path: &str,
) -> Result<Vec<GitCommitInfo>>
pub async fn history( &self, sandbox_id: &Uuid, path: &str, ) -> Result<Vec<GitCommitInfo>>
Get Git history (log)
Sourcepub async fn log(
&self,
sandbox_id: &Uuid,
path: &str,
) -> Result<Vec<GitCommitInfo>>
pub async fn log( &self, sandbox_id: &Uuid, path: &str, ) -> Result<Vec<GitCommitInfo>>
Get Git log (alias for history)
Sourcepub async fn list_branches(
&self,
sandbox_id: &Uuid,
path: &str,
) -> Result<Vec<String>>
pub async fn list_branches( &self, sandbox_id: &Uuid, path: &str, ) -> Result<Vec<String>>
List branches
Sourcepub async fn create_branch(
&self,
sandbox_id: &Uuid,
path: &str,
branch_name: &str,
) -> Result<()>
pub async fn create_branch( &self, sandbox_id: &Uuid, path: &str, branch_name: &str, ) -> Result<()>
Create branch
Sourcepub async fn switch_branch(
&self,
sandbox_id: &Uuid,
path: &str,
branch_name: &str,
) -> Result<()>
pub async fn switch_branch( &self, sandbox_id: &Uuid, path: &str, branch_name: &str, ) -> Result<()>
Switch branch
Auto Trait Implementations§
impl<'a> Freeze for GitManager<'a>
impl<'a> !RefUnwindSafe for GitManager<'a>
impl<'a> Send for GitManager<'a>
impl<'a> Sync for GitManager<'a>
impl<'a> Unpin for GitManager<'a>
impl<'a> !UnwindSafe for GitManager<'a>
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