pub struct RepositoryApi { /* private fields */ }Expand description
Repository API for deployment-independent repository operations
Implementations§
Source§impl RepositoryApi
impl RepositoryApi
Sourcepub async fn initialize_provider_selection(&mut self) -> Result<ProviderType>
pub async fn initialize_provider_selection(&mut self) -> Result<ProviderType>
Initialize provider selection
Sourcepub async fn ensure_provider_ready(&self) -> Result<()>
pub async fn ensure_provider_ready(&self) -> Result<()>
Ensure the active provider is ready
Sourcepub async fn create_repository(
&self,
repo_id: &str,
workspace_id: Option<&str>,
) -> Result<RepositoryHandle>
pub async fn create_repository( &self, repo_id: &str, workspace_id: Option<&str>, ) -> Result<RepositoryHandle>
Create a new repository
Sourcepub async fn open_repository(&self, repo_id: &str) -> Result<RepositoryHandle>
pub async fn open_repository(&self, repo_id: &str) -> Result<RepositoryHandle>
Open an existing repository
Sourcepub async fn publish(
&self,
repo_handle: &RepositoryHandle,
message: &str,
) -> Result<String>
pub async fn publish( &self, repo_handle: &RepositoryHandle, message: &str, ) -> Result<String>
Publish changes (semantic operation)
Sourcepub async fn history(
&self,
repo_handle: &RepositoryHandle,
limit: usize,
) -> Result<Vec<CommitInfo>>
pub async fn history( &self, repo_handle: &RepositoryHandle, limit: usize, ) -> Result<Vec<CommitInfo>>
Get repository history
Sourcepub async fn create_branch(
&self,
repo_handle: &RepositoryHandle,
branch_name: &str,
) -> Result<()>
pub async fn create_branch( &self, repo_handle: &RepositoryHandle, branch_name: &str, ) -> Result<()>
Create a branch
Sourcepub async fn switch_branch(
&self,
repo_handle: &RepositoryHandle,
branch_name: &str,
) -> Result<()>
pub async fn switch_branch( &self, repo_handle: &RepositoryHandle, branch_name: &str, ) -> Result<()>
Switch to a branch
Sourcepub async fn list_branches(
&self,
repo_handle: &RepositoryHandle,
) -> Result<Vec<String>>
pub async fn list_branches( &self, repo_handle: &RepositoryHandle, ) -> Result<Vec<String>>
List branches
Sourcepub async fn sync(&self, repo_handle: &RepositoryHandle) -> Result<()>
pub async fn sync(&self, repo_handle: &RepositoryHandle) -> Result<()>
Synchronize repository (for cloud/remote providers)
Sourcepub async fn delete_repository(
&self,
repo_handle: &RepositoryHandle,
) -> Result<()>
pub async fn delete_repository( &self, repo_handle: &RepositoryHandle, ) -> Result<()>
Delete a repository
Sourcepub fn active_provider(&self) -> Option<&Arc<dyn Provider>>
pub fn active_provider(&self) -> Option<&Arc<dyn Provider>>
Get the active provider, if any.
Sourcepub fn provider_manager_mut(&mut self) -> &mut ProviderManager
pub fn provider_manager_mut(&mut self) -> &mut ProviderManager
Get mutable access to the provider manager (for fallback, etc.).
Sourcepub fn provider_manager(&self) -> &ProviderManager
pub fn provider_manager(&self) -> &ProviderManager
Get the provider manager (read-only).
Sourcepub async fn provider_status(&self) -> Result<ProviderStatus>
pub async fn provider_status(&self) -> Result<ProviderStatus>
Get provider status
Trait Implementations§
Source§impl RepositoryApiFallback for RepositoryApi
impl RepositoryApiFallback for RepositoryApi
Source§async fn with_fallback<F, Fut, T>(&mut self, operation: F) -> Result<T>
async fn with_fallback<F, Fut, T>(&mut self, operation: F) -> Result<T>
Perform operation with automatic fallback. Read more
Source§async fn ensure_provider_with_fallback(&mut self) -> Result<bool>
async fn ensure_provider_with_fallback(&mut self) -> Result<bool>
Check provider health and fallback if needed.
Returns
Ok(true) if provider is healthy or fallback succeeded.Auto Trait Implementations§
impl !RefUnwindSafe for RepositoryApi
impl !UnwindSafe for RepositoryApi
impl Freeze for RepositoryApi
impl Send for RepositoryApi
impl Sync for RepositoryApi
impl Unpin for RepositoryApi
impl UnsafeUnpin for RepositoryApi
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
fn instrument(self, span: Span) -> Instrumented<Self> ⓘ
Source§fn in_current_span(self) -> Instrumented<Self> ⓘ
fn in_current_span(self) -> Instrumented<Self> ⓘ
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
fn into_either(self, into_left: bool) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self> ⓘ
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§impl<T> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
Wrap the input message
T in a tonic::Request