KeiSeiKit-1.0/_primitives/_rust/kei-store/src/gitea.rs
Parfii-bot a4e667de10 KeiSeiKit-public — clean state
Single-commit clean baseline after security scrub of niche-tells,
project codenames, internal jargon, and contributor-email leaks.

Contents:
- 100 Rust crates (_primitives/_rust/)
- 37 agent manifests (_manifests/) + generated specs (_generated/)
- 67 user-invocable skills (skills/)
- 33 hooks (hooks/)
- Composition blocks (_blocks/)
- Documentation (docs/, README.md)
- TS adapter packages (_ts_packages/)
- Assembler (_assembler/)
- Roles (_roles/)
- Templates (_templates/)
- Forgejo CI (.forgejo/)

Author: Denis Parfionovich <info@greendragon.info>

License: see LICENSE.
2026-05-01 12:09:03 +08:00

28 lines
1.1 KiB
Rust

//! GiteaStore — same wire protocol as Forgejo; separate type for clarity.
use crate::config::GitRemoteCfg;
use crate::github::GitHubStore;
use anyhow::Result;
use std::path::PathBuf;
pub struct GiteaStore {
inner: GitHubStore,
}
impl GiteaStore {
pub fn new(local: PathBuf, remote: GitRemoteCfg) -> Result<Self> {
let inner = GitHubStore::with_name(local, remote, "gitea")?;
Ok(Self { inner })
}
}
impl crate::store_trait::MemoryStore for GiteaStore {
fn read(&self, path: &str) -> Result<Vec<u8>> { self.inner.read(path) }
fn write(&self, path: &str, bytes: &[u8]) -> Result<()> { self.inner.write(path, bytes) }
fn list(&self, dir: &str) -> Result<Vec<String>> { self.inner.list(dir) }
fn branch(&self, name: &str) -> Result<()> { self.inner.branch(name) }
fn commit(&self, message: &str) -> Result<String> { self.inner.commit(message) }
fn push(&self, branch: &str) -> Result<()> { self.inner.push(branch) }
fn pull(&self, branch: &str) -> Result<()> { self.inner.pull(branch) }
fn backend_name(&self) -> &'static str { "gitea" }
}