use crate::context::facade::GitContext; use crate::lfs; pub use crate::lfs::types::*; use crate::service::GitService; use crate::share::errors::GitError; impl GitService { pub async fn lfs_download_to( &self, _space_name: String, _repo_name: String, _oid: String, _writer: &mut W, ) -> Result where W: tokio::io::AsyncWrite + Send + Unpin, { Err(GitError::Unimplemented( "LFS object download is served by KenShell", )) } pub async fn lfs_lock( &self, ctx: &GitContext, owner: i64, path: String, oid: Option, ) -> Result { lfs::create_lock(self, ctx, owner, path, oid).await } pub async fn lfs_unlock( &self, ctx: &GitContext, owner: i64, path: String, force: bool, ) -> Result<(), GitError> { lfs::unlock(self, ctx, owner, path, force).await } pub async fn lfs_unlock_by_id( &self, ctx: &GitContext, owner: i64, lock_id: String, force: bool, ) -> Result<(), GitError> { lfs::unlock_by_id(self, ctx, owner, lock_id, force).await } pub async fn lfs_list_locks( &self, ctx: &GitContext, cursor: Option, limit: u64, ) -> Result { lfs::list_locks(self, ctx, cursor, limit).await } pub async fn lfs_verify_locks( &self, ctx: &GitContext, caller: i64, limit: u64, ) -> Result { lfs::verify_locks(self, ctx, caller, limit).await } pub async fn lfs_cleanup_unreferenced(&self, _ctx: &GitContext) -> Result { Err(GitError::Unimplemented("LFS cleanup is served by KenShell")) } }