pub struct HostedGrpcClient { /* private fields */ }Implementations§
Source§impl HostedGrpcClient
impl HostedGrpcClient
pub async fn get_compare( &mut self, repo_path: &str, from: &str, to: &str, include_semantic: bool, ) -> Result<CompareResponse, ProtocolError>
pub async fn get_blame( &mut self, repo_path: &str, ref: Option<&str>, path: &str, ) -> Result<GetBlameResponse, ProtocolError>
pub async fn list_context( &mut self, repo_path: &str, ref: Option<&str>, prefix: Option<&str>, tag_filter: Option<&str>, ) -> Result<ListContextResponse, ProtocolError>
pub async fn set_context( &mut self, repo_path: &str, path: &str, target_state_id: Option<&str>, scope: AnnotationScope, kind: ContextAnnotationKind, tags: Vec<String>, content: &str, agent_provider: Option<&str>, agent_model: Option<&str>, ) -> Result<SetContextResponse, ProtocolError>
pub async fn get_context_history( &mut self, repo_path: &str, ref: Option<&str>, annotation_id: &str, ) -> Result<GetContextHistoryResponse, ProtocolError>
pub async fn list_context_suggestions( &mut self, repo_path: &str, ref: Option<&str>, limit: u32, ) -> Result<ListContextSuggestionsResponse, ProtocolError>
pub async fn revise_context( &mut self, repo_path: &str, annotation_id: &str, content: &str, tags: Vec<String>, agent_provider: Option<&str>, agent_model: Option<&str>, kind: ContextAnnotationKind, ) -> Result<ReviseContextResponse, ProtocolError>
pub async fn supersede_context( &mut self, repo_path: &str, annotation_id: &str, path: Option<&str>, target_state_id: Option<&str>, scope: AnnotationScope, tags: Vec<String>, content: &str, agent_provider: Option<&str>, agent_model: Option<&str>, kind: ContextAnnotationKind, ) -> Result<SupersedeContextResponse, ProtocolError>
Source§impl HostedGrpcClient
impl HostedGrpcClient
pub async fn hydrate_pulled_state( &mut self, repo: &Repository, repo_path: &str, remote_thread: &str, target_state: ChangeId, ) -> Result<usize, ProtocolError>
Source§impl HostedGrpcClient
impl HostedGrpcClient
pub async fn list_refs( &mut self, repo_path: &str, ) -> Result<Vec<RefEntry>, ProtocolError>
pub async fn update_ref( &mut self, repo_path: &str, name: &str, is_thread: bool, old_value: Option<ChangeId>, new_value: ChangeId, force: bool, thread_metadata: Option<&SyncedThreadMetadata>, ) -> Result<RefUpdated, ProtocolError>
pub async fn push( &mut self, repo: &Repository, repo_path: &str, local_state: ChangeId, target_thread: &str, force: bool, ) -> Result<PushComplete, ProtocolError>
pub async fn pull( &mut self, repo: &Repository, repo_path: &str, remote_thread: &str, local_thread: Option<&str>, ) -> Result<PullComplete, ProtocolError>
pub async fn pull_profiled( &mut self, repo: &Repository, repo_path: &str, remote_thread: &str, local_thread: Option<&str>, ) -> Result<(PullComplete, PullProfile), ProtocolError>
pub async fn pull_partial( &mut self, repo: &Repository, repo_path: &str, remote_thread: &str, local_thread: Option<&str>, ) -> Result<PullComplete, ProtocolError>
pub async fn pull_with_depth_and_materialization( &mut self, repo: &Repository, repo_path: &str, remote_thread: &str, local_thread: Option<&str>, depth: Option<u32>, materialization: PullMaterialization, ) -> Result<PullComplete, ProtocolError>
pub async fn pull_with_depth( &mut self, repo: &Repository, repo_path: &str, remote_thread: &str, local_thread: Option<&str>, depth: Option<u32>, ) -> Result<PullComplete, ProtocolError>
pub async fn fetch_state( &mut self, repo: &Repository, repo_path: &str, remote_thread: &str, target_state: ChangeId, ) -> Result<usize, ProtocolError>
pub async fn fetch_state_partial( &mut self, repo: &Repository, repo_path: &str, remote_thread: &str, target_state: ChangeId, ) -> Result<usize, ProtocolError>
pub async fn hydrate_blob_at_path( &mut self, repo: &Repository, repo_path: &str, reference: &str, path: &str, ) -> Result<Blob, ProtocolError>
pub async fn hydrate_missing_blobs_for_state( &mut self, repo: &Repository, repo_path: &str, remote_thread: &str, target_state: ChangeId, ) -> Result<usize, ProtocolError>
Source§impl HostedGrpcClient
impl HostedGrpcClient
pub async fn begin_login( &mut self, username: &str, ) -> Result<(String, String, u64), ProtocolError>
pub async fn get_current_user_namespace( &mut self, ) -> Result<HostedNamespaceInfo, ProtocolError>
pub async fn list_namespaces( &mut self, ) -> Result<Vec<HostedNamespaceInfo>, ProtocolError>
pub async fn create_namespace( &mut self, kind: &str, slug: &str, parent_path: Option<&str>, display_name: Option<String>, ) -> Result<HostedNamespaceInfo, ProtocolError>
pub async fn create_repository( &mut self, namespace_path: &str, slug: &str, ) -> Result<HostedRepositoryInfo, ProtocolError>
pub async fn list_repositories( &mut self, namespace_path: Option<&str>, ) -> Result<Vec<HostedRepositoryInfo>, ProtocolError>
pub async fn update_namespace( &mut self, full_path: &str, new_slug: Option<&str>, display_name: Option<Option<String>>, ) -> Result<HostedNamespaceInfo, ProtocolError>
pub async fn delete_namespace( &mut self, full_path: &str, ) -> Result<(), ProtocolError>
pub async fn update_repository( &mut self, full_path: &str, new_slug: &str, ) -> Result<HostedRepositoryInfo, ProtocolError>
pub async fn delete_repository( &mut self, full_path: &str, ) -> Result<(), ProtocolError>
pub async fn create_grant( &mut self, subject: &str, role: &str, namespace_path: Option<&str>, repo_path: Option<&str>, ) -> Result<HostedGrantInfo, ProtocolError>
pub async fn list_grants( &mut self, resource: Option<&str>, ) -> Result<Vec<HostedGrantInfo>, ProtocolError>
pub async fn update_grant( &mut self, subject: &str, role: &str, namespace_path: Option<&str>, repo_path: Option<&str>, ) -> Result<HostedGrantInfo, ProtocolError>
pub async fn delete_grant( &mut self, subject: &str, namespace_path: Option<&str>, repo_path: Option<&str>, ) -> Result<(), ProtocolError>
Sourcepub async fn create_invitation(
&mut self,
email: &str,
namespace_path: &str,
role: &str,
) -> Result<ProtoInvitation, ProtocolError>
pub async fn create_invitation( &mut self, email: &str, namespace_path: &str, role: &str, ) -> Result<ProtoInvitation, ProtocolError>
Track D — create a pending invitation. Returns the raw proto type to keep the surface narrow until we settle on a domain shape.
Sourcepub async fn approve_thread(
&mut self,
repo_path: &str,
source_thread: &str,
target_thread: &str,
source_state: &str,
note: Option<&str>,
) -> Result<ThreadApproval, ProtocolError>
pub async fn approve_thread( &mut self, repo_path: &str, source_thread: &str, target_thread: &str, source_state: &str, note: Option<&str>, ) -> Result<ThreadApproval, ProtocolError>
Record an approval for (source_thread → target_thread) at
the source’s current source_state. The server’s gate decides
later whether this approval counts against any matching
policy’s requirements.
pub async fn revoke_approval(&mut self, id: &str) -> Result<(), ProtocolError>
pub async fn list_thread_approvals( &mut self, repo_path: &str, source_thread: &str, target_thread: &str, ) -> Result<Vec<ThreadApproval>, ProtocolError>
Sourcepub async fn check_merge_eligibility(
&mut self,
repo_path: &str,
source_thread: &str,
target_thread: &str,
source_state: &str,
gated_action: &str,
changed_paths: Vec<String>,
author_user_id: Option<&str>,
) -> Result<CheckMergeEligibilityResponse, ProtocolError>
pub async fn check_merge_eligibility( &mut self, repo_path: &str, source_thread: &str, target_thread: &str, source_state: &str, gated_action: &str, changed_paths: Vec<String>, author_user_id: Option<&str>, ) -> Result<CheckMergeEligibilityResponse, ProtocolError>
Ask the server “can changed_paths?” The
reply lists every unmet requirement and the approvals that
counted as valid.
Sourcepub async fn grant_support_access(
&mut self,
operator_email: &str,
namespace_path: Option<&str>,
repo_path: Option<&str>,
ttl_seconds: u32,
reason: &str,
client_operation_id: String,
) -> Result<SupportAccessGrant, ProtocolError>
pub async fn grant_support_access( &mut self, operator_email: &str, namespace_path: Option<&str>, repo_path: Option<&str>, ttl_seconds: u32, reason: &str, client_operation_id: String, ) -> Result<SupportAccessGrant, ProtocolError>
Phase C: grant a Heddle staff member temporary admin on a
namespace or repo. Exactly one of namespace_path or
repo_path should be set.
pub async fn list_support_access_grants( &mut self, namespace_path: Option<&str>, repo_path: Option<&str>, include_inactive: bool, ) -> Result<Vec<SupportAccessGrant>, ProtocolError>
pub async fn revoke_support_access( &mut self, id: &str, client_operation_id: String, ) -> Result<(), ProtocolError>
Source§impl HostedGrpcClient
impl HostedGrpcClient
pub async fn connect( addr: SocketAddr, config: &ClientConfig, ) -> Result<Self, ProtocolError>
Sourcepub async fn auto_rotate_if_needed(&mut self)
pub async fn auto_rotate_if_needed(&mut self)
Transparently rotate the credential for this client if it is near expiry.
No-ops if server_key was not set on ClientConfig at construction
time, or if no credential is stored for the server, or if the token is
not within 10 minutes of expiry.
Auto Trait Implementations§
impl !Freeze for HostedGrpcClient
impl !RefUnwindSafe for HostedGrpcClient
impl Send for HostedGrpcClient
impl Sync for HostedGrpcClient
impl Unpin for HostedGrpcClient
impl UnsafeUnpin for HostedGrpcClient
impl !UnwindSafe for HostedGrpcClient
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
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> IntoRequest<T> for T
impl<T> IntoRequest<T> for T
Source§fn into_request(self) -> Request<T>
fn into_request(self) -> Request<T>
T in a tonic::Request