1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
//! # solid-pod-rs-git
//!
//! Git HTTP smart-protocol backend for
//! [`solid-pod-rs`](https://crates.io/crates/solid-pod-rs).
//!
//! ## Modules
//!
//! - [`service`] — Framework-agnostic [`GitHttpService`] that speaks `git-http-backend` CGI.
//! - [`auth`] — `Basic nostr:<token>` and NIP-98 bearer auth extractors.
//! - [`guard`] — Path-traversal rejection and repo-slug extraction.
//! - [`config`] — Git repository config helpers (`receive.denyCurrentBranch`, etc.).
//! - [`error`] — [`GitError`] enum with HTTP status-code mapping.
//!
//! ## Quick start
//!
//! ```no_run
//! use std::path::PathBuf;
//! use solid_pod_rs_git::{GitHttpService, BasicNostrExtractor};
//!
//! # async fn run() {
//! // Create the service rooted at a pod's data directory.
//! let service = GitHttpService::new(PathBuf::from("/var/pods/alice"))
//! .with_auth(BasicNostrExtractor::new());
//!
//! // In your HTTP router, translate framework types to GitRequest and call:
//! // let response = service.handle(git_request).await;
//! # }
//! ```
//!
//! ## Feature flags
//!
//! | Flag | Purpose |
//! |-------------------|-------------------------------------------------|
//! | `with-git-binary` | Enable integration tests that need the `git` CLI and `git-http-backend` CGI binary. Unit tests always run. |
//!
//! ## Architecture
//!
//! The crate is framework-agnostic: [`GitHttpService`] consumes a
//! [`GitRequest`] and produces a [`GitResponse`]. The embedding HTTP
//! server (axum, actix-web, hyper, ...) translates between its native
//! types and these. Internally the service spawns `git http-backend`
//! (path overridable via `GIT_HTTP_BACKEND_PATH`) and shuttles bytes.
pub use ;
pub use ;
pub use GitError;
pub use ;
pub use ;