pub struct GitHttpService { /* private fields */ }Expand description
The Git HTTP service.
Implementations§
Source§impl GitHttpService
impl GitHttpService
Sourcepub fn new(repo_root: PathBuf) -> Self
pub fn new(repo_root: PathBuf) -> Self
Build a service rooted at repo_root. All repos served must
live under this directory.
Sourcepub fn with_backend_path(self, path: PathBuf) -> Self
pub fn with_backend_path(self, path: PathBuf) -> Self
Override the default CGI binary path.
Sourcepub fn with_auth<A: GitAuth + 'static>(self, auth: A) -> Self
pub fn with_auth<A: GitAuth + 'static>(self, auth: A) -> Self
Plug in an authoriser. Without one, write requests still
succeed — the service becomes an anonymous-push setup, which
is the behaviour JSS uses when no handleAuth pre-hook fires.
Sourcepub fn with_auth_arc(self, auth: Arc<dyn GitAuth>) -> Self
pub fn with_auth_arc(self, auth: Arc<dyn GitAuth>) -> Self
Same as [with_auth] but takes a pre-boxed Arc.
Sourcepub async fn handle(&self, req: GitRequest) -> Result<GitResponse, GitError>
pub async fn handle(&self, req: GitRequest) -> Result<GitResponse, GitError>
Handle an incoming Git HTTP request.
Trait Implementations§
Source§impl Clone for GitHttpService
impl Clone for GitHttpService
Source§fn clone(&self) -> GitHttpService
fn clone(&self) -> GitHttpService
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for GitHttpService
impl !RefUnwindSafe for GitHttpService
impl Send for GitHttpService
impl Sync for GitHttpService
impl Unpin for GitHttpService
impl UnsafeUnpin for GitHttpService
impl !UnwindSafe for GitHttpService
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