autocrate/src/serverapi/gitea.rs

33 lines
714 B
Rust
Raw Normal View History

2024-02-16 20:00:55 +01:00
use async_trait::async_trait;
2024-02-24 14:33:58 +01:00
use super::{PublishContext, ReleaseContext, ServerApi};
2024-02-16 20:00:55 +01:00
use crate::{
2024-02-24 14:44:06 +01:00
config::{Api, 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 {
2024-02-24 14:44:06 +01:00
async fn init(&mut self, _cfg: &Config) -> Result<()> {
2024-02-16 20:00:55 +01:00
todo!()
}
2024-02-24 14:44:06 +01:00
async fn push_release(&mut self, _rc: &ReleaseContext) -> Result<()> {
2024-02-16 20:00:55 +01:00
todo!()
}
2024-02-24 14:44:06 +01:00
async fn push_release_artifact(&mut self, _rc: &ReleaseContext) -> Result<()> {
2024-02-24 13:24:14 +01:00
todo!()
}
2024-02-24 14:44:06 +01:00
async fn push_pkg(&mut self, _pc: &PublishContext) -> Result<()> {
2024-02-19 22:07:51 +01:00
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
}
}