autocrate/src/serverapi/gitea.rs

33 lines
668 B
Rust
Raw Normal View History

2024-02-16 20:00:55 +01:00
use async_trait::async_trait;
use super::ServerApi;
use crate::{
2024-02-24 14:10:44 +01:00
config::{packages::PackageType, Api, ApiType, Config},
2024-02-16 20:00:55 +01:00
error::*,
};
2024-02-24 14:10:44 +01:00
pub struct Gitea {
cfg: Api,
}
2024-02-16 20:00:55 +01:00
#[async_trait]
impl ServerApi for Gitea {
async fn init(&mut self, cfg: &Config) -> Result<()> {
todo!()
}
async fn push_release(&mut self) -> Result<()> {
todo!()
}
2024-02-24 13:24:14 +01:00
async fn push_release_artifact(&mut self) -> Result<()> {
todo!()
}
2024-02-19 22:07:51 +01:00
async fn push_pkg(&mut self, pkg_type: PackageType) -> Result<()> {
todo!()
}
2024-02-16 20:00:55 +01:00
}
impl Gitea {
2024-02-24 14:10:44 +01:00
pub async fn build(api: &Api) -> Result<Self> {
Ok(Self { cfg: api.clone() })
2024-02-16 20:00:55 +01:00
}
}