chore: move AddonDescriptor from api to lib

This commit is contained in:
Timo Ley 2022-12-08 13:20:04 +01:00
parent 2e32cb55fd
commit 70a85e9796
2 changed files with 9 additions and 7 deletions

View file

@ -1,5 +1,7 @@
use serde::{Deserialize, Serialize};
use crate::AddonDescriptor;
use super::{AddonScript, File, Hashes, Meta};
#[derive(Debug, Serialize, Deserialize)]
@ -20,13 +22,6 @@ pub struct APIFile {
pub meta: Option<Meta>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct AddonDescriptor {
pub id: String,
pub namespace: String,
pub version: String,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct EnvObject {
#[serde(skip_serializing_if = "Option::is_none")]

View file

@ -44,6 +44,13 @@ impl Default for AddonScript {
}
}
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)]
pub struct AddonDescriptor {
pub id: String,
pub namespace: String,
pub version: Option<String>,
}
#[derive(Debug, Serialize, Deserialize)]
pub struct Repository {
pub namespace: String,