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: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!()
|
|
|
|
}
|
2024-02-24 14:33:58 +01:00
|
|
|
async fn push_release(&mut self, rc: &ReleaseContext) -> Result<()> {
|
2024-02-16 20:00:55 +01:00
|
|
|
todo!()
|
|
|
|
}
|
2024-02-24 14:33:58 +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:33:58 +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
|
|
|
}
|
|
|
|
}
|