Skip to main content

HostedGrpcClient

Struct HostedGrpcClient 

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

Implementations§

Source§

impl HostedGrpcClient

Source

pub async fn get_compare( &mut self, repo_path: &str, from: &str, to: &str, include_semantic: bool, ) -> Result<CompareResponse, ProtocolError>

Source

pub async fn get_blame( &mut self, repo_path: &str, ref: Option<&str>, path: &str, ) -> Result<GetBlameResponse, ProtocolError>

Source

pub async fn list_context( &mut self, repo_path: &str, ref: Option<&str>, prefix: Option<&str>, tag_filter: Option<&str>, ) -> Result<ListContextResponse, ProtocolError>

Source

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>

Source

pub async fn get_context_history( &mut self, repo_path: &str, ref: Option<&str>, annotation_id: &str, ) -> Result<GetContextHistoryResponse, ProtocolError>

Source

pub async fn list_context_suggestions( &mut self, repo_path: &str, ref: Option<&str>, limit: u32, ) -> Result<ListContextSuggestionsResponse, ProtocolError>

Source

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>

Source

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

Source

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

Source

pub async fn list_refs( &mut self, repo_path: &str, ) -> Result<Vec<RefEntry>, ProtocolError>

Source

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>

Source

pub async fn push( &mut self, repo: &Repository, repo_path: &str, local_state: ChangeId, target_thread: &str, force: bool, ) -> Result<PushComplete, ProtocolError>

Source

pub async fn pull( &mut self, repo: &Repository, repo_path: &str, remote_thread: &str, local_thread: Option<&str>, ) -> Result<PullComplete, ProtocolError>

Source

pub async fn pull_profiled( &mut self, repo: &Repository, repo_path: &str, remote_thread: &str, local_thread: Option<&str>, ) -> Result<(PullComplete, PullProfile), ProtocolError>

Source

pub async fn pull_partial( &mut self, repo: &Repository, repo_path: &str, remote_thread: &str, local_thread: Option<&str>, ) -> Result<PullComplete, ProtocolError>

Source

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>

Source

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>

Source

pub async fn fetch_state( &mut self, repo: &Repository, repo_path: &str, remote_thread: &str, target_state: ChangeId, ) -> Result<usize, ProtocolError>

Source

pub async fn fetch_state_partial( &mut self, repo: &Repository, repo_path: &str, remote_thread: &str, target_state: ChangeId, ) -> Result<usize, ProtocolError>

Source

pub async fn hydrate_blob_at_path( &mut self, repo: &Repository, repo_path: &str, reference: &str, path: &str, ) -> Result<Blob, ProtocolError>

Source

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

Source

pub async fn begin_login( &mut self, username: &str, ) -> Result<(String, String, u64), ProtocolError>

Source

pub async fn get_current_user_namespace( &mut self, ) -> Result<HostedNamespaceInfo, ProtocolError>

Source

pub async fn list_namespaces( &mut self, ) -> Result<Vec<HostedNamespaceInfo>, ProtocolError>

Source

pub async fn create_namespace( &mut self, kind: &str, slug: &str, parent_path: Option<&str>, display_name: Option<String>, ) -> Result<HostedNamespaceInfo, ProtocolError>

Source

pub async fn create_repository( &mut self, namespace_path: &str, slug: &str, ) -> Result<HostedRepositoryInfo, ProtocolError>

Source

pub async fn list_repositories( &mut self, namespace_path: Option<&str>, ) -> Result<Vec<HostedRepositoryInfo>, ProtocolError>

Source

pub async fn update_namespace( &mut self, full_path: &str, new_slug: Option<&str>, display_name: Option<Option<String>>, ) -> Result<HostedNamespaceInfo, ProtocolError>

Source

pub async fn delete_namespace( &mut self, full_path: &str, ) -> Result<(), ProtocolError>

Source

pub async fn update_repository( &mut self, full_path: &str, new_slug: &str, ) -> Result<HostedRepositoryInfo, ProtocolError>

Source

pub async fn delete_repository( &mut self, full_path: &str, ) -> Result<(), ProtocolError>

Source

pub async fn create_grant( &mut self, subject: &str, role: &str, namespace_path: Option<&str>, repo_path: Option<&str>, ) -> Result<HostedGrantInfo, ProtocolError>

Source

pub async fn list_grants( &mut self, resource: Option<&str>, ) -> Result<Vec<HostedGrantInfo>, ProtocolError>

Source

pub async fn update_grant( &mut self, subject: &str, role: &str, namespace_path: Option<&str>, repo_path: Option<&str>, ) -> Result<HostedGrantInfo, ProtocolError>

Source

pub async fn delete_grant( &mut self, subject: &str, namespace_path: Option<&str>, repo_path: Option<&str>, ) -> Result<(), ProtocolError>

Source

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.

Source

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.

Source

pub async fn revoke_approval(&mut self, id: &str) -> Result<(), ProtocolError>

Source

pub async fn list_thread_approvals( &mut self, repo_path: &str, source_thread: &str, target_thread: &str, ) -> Result<Vec<ThreadApproval>, ProtocolError>

Source

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 merge into at <source_state>, given the diff touches changed_paths?” The reply lists every unmet requirement and the approvals that counted as valid.

Source

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.

Source

pub async fn list_support_access_grants( &mut self, namespace_path: Option<&str>, repo_path: Option<&str>, include_inactive: bool, ) -> Result<Vec<SupportAccessGrant>, ProtocolError>

Source

pub async fn revoke_support_access( &mut self, id: &str, client_operation_id: String, ) -> Result<(), ProtocolError>

Source§

impl HostedGrpcClient

Source

pub async fn connect( addr: SocketAddr, config: &ClientConfig, ) -> Result<Self, ProtocolError>

Source

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§

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> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T> Instrument for T

Source§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more
Source§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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> IntoRequest<T> for T

Source§

fn into_request(self) -> Request<T>

Wrap the input message T in a tonic::Request
Source§

impl<L> LayerExt<L> for L

Source§

fn named_layer<S>(&self, service: S) -> Layered<<L as Layer<S>>::Service, S>
where L: Layer<S>,

Applies the layer to a service and wraps it in Layered.
Source§

impl<T> Pointable for T

Source§

const ALIGN: usize

The alignment of pointer.
Source§

type Init = T

The type for initializers.
Source§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
Source§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
Source§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
Source§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
Source§

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

Source§

fn and<P, B, E>(self, other: P) -> And<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow only if self and other return Action::Follow. Read more
Source§

fn or<P, B, E>(self, other: P) -> Or<T, P>
where T: Policy<B, E>, P: Policy<B, E>,

Create a new Policy that returns Action::Follow if either self or other returns Action::Follow. Read more
Source§

impl<T> Same for T

Source§

type Output = T

Should always be Self
Source§

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

Source§

type Error = Infallible

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.
Source§

impl<V, T> VZip<V> for T
where V: MultiLane<T>,

Source§

fn vzip(self) -> V

Source§

impl<T> WithSubscriber for T

Source§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a WithDispatch wrapper. Read more
Source§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a WithDispatch wrapper. Read more