Skip to main content

git_lfs_api/
lib.rs

1//! HTTP client for the git-lfs batch and locking APIs.
2//!
3//! See `docs/api/` for the wire-protocol specification.
4//!
5//! Scope is deliberately narrow: this crate handles JSON request/response
6//! against the LFS server. Concurrency, retries, and the actual byte
7//! transfer against action URLs live in `git-lfs-transfer`. Credential
8//! resolution lives in `git-lfs-creds`. Server URL discovery from a git
9//! remote lives in `git-lfs-git`.
10
11// ApiError::Status carries enough context (URL, body, LFS-Authenticate,
12// Retry-After) that it crosses clippy's default 128-byte threshold for
13// the Err arm. Boxing the variant would cascade through every match
14// site; for an error type used only on failure paths the size is not
15// worth chasing.
16#![allow(clippy::result_large_err)]
17
18mod auth;
19mod batch;
20mod client;
21mod error;
22mod locks;
23mod models;
24mod ssh;
25
26pub use auth::Auth;
27pub use batch::{
28    Action, Actions, BatchRequest, BatchResponse, ObjectError, ObjectResult, ObjectSpec, Operation,
29};
30pub use client::Client;
31pub use error::{ApiError, ServerError, parse_retry_after};
32pub use locks::{
33    CreateLockError, CreateLockRequest, DeleteLockRequest, ListLocksFilter, LockList,
34    VerifyLocksRequest, VerifyLocksResponse,
35};
36pub use models::{Lock, Owner, Ref};
37pub use ssh::{SharedSshResolver, SshAuth, SshOperation, SshResolver};