MCModpackManager/src/providers/mod.rs

22 lines
637 B
Rust
Raw Normal View History

2024-08-17 22:34:06 +01:00
use std::{collections::HashSet, path::PathBuf};
2024-08-17 16:11:04 +01:00
use serde::{Deserialize, Serialize};
use crate::mod_meta::ModMeta;
pub mod modrinth;
pub mod raw;
2024-08-17 21:06:31 +01:00
#[derive(Serialize, Deserialize, Clone)]
2024-08-18 22:25:01 +01:00
pub enum FileSource {
Download { url: String, sha1: String, sha512: String, filename: String},
Local { path: PathBuf, sha1: String, sha512: String, filename: String },
2024-08-17 16:11:04 +01:00
}
2024-08-17 21:06:31 +01:00
#[derive(Serialize, Deserialize, Clone)]
2024-08-17 16:11:04 +01:00
pub struct PinnedMod {
/// Source of the files for the mod
2024-08-18 22:25:01 +01:00
pub source: Vec<FileSource>,
2024-08-17 16:11:04 +01:00
/// Version of mod
pub version: String,
2024-08-17 16:11:04 +01:00
/// Pinned dependencies of a pinned mod
2024-08-17 22:34:06 +01:00
pub deps: Option<HashSet<ModMeta>>
2024-08-17 16:11:04 +01:00
}