This repository has been archived by the owner on Dec 12, 2024. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Browse files
Browse the repository at this point in the history
Added the Downloader structure. Now Downloader is a list for downloading, which can verify and download. Errors have been moved to make them global. Added comments in English for example configuration. Direct Default specifications for structures have been removed, now using Derive. A "framework" for checking for Downloader has been made. The Model folder now belongs to Downloader. Now models will provide links for downloading and file hashes for verification. Lock added for future config.lock. Начата работа над Downloader. Добавил структуру Downloader. Теперь Downloader это лист для скачивания, который может проверить и скачать. Перенесены ошибки, чтобы сделать их глобальными. Добавлены комментарии на английском для примера конфигурации. Убраны прямые указания Default для структур, теперь используем Derive Сделан каркас для проверки для Downloader. Папка Model теперь относится к Downloader. Теперь модели будут предоставлять ссылки для скачивания и хеш файла для проверки. Добавлен Lock, для будущего config.lock.
- Loading branch information
Showing
19 changed files
with
314 additions
and
302 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,37 +1,48 @@ | ||
#Sample of config | ||
# Пример конфигурации | ||
# Sample of config | ||
|
||
#freez - добавлять ли на проверку/скачивание если object присутствует. | ||
# freez - добавлять ли на проверку/скачивание если object присутствует. | ||
# freez - whether to add for checking/downloading if object is present. | ||
|
||
# Секция ядра | ||
# Секция ядра / Core section | ||
[core] | ||
# Выбери один из вариантов: vanila, spigot, bucket, paper, purpur | ||
# Choose one of the options: vanilla, spigot, bucket, paper, purpur | ||
provider = "paper" | ||
# Версия сервера (например, "1.14.4" или специальный код) | ||
# Server version (e.g., "1.14.4" or a special code) | ||
version = "1.14.4" | ||
# Замораживать ли объекты при наличии в системе | ||
# Whether to freeze objects if present in the system | ||
freeze = false | ||
force_update = false | ||
|
||
# Update - не требуется при загрузке, он нужен только когда freez = true, чтобы обновить на туже версию, либо принудительно обновить на самую последнюю, даже когда обновления нет. | ||
# Секция плагинов | ||
# Update - not required on load, only needed when freez = true, to update to the same version, or forcibly update to the latest, even when there are no updates. | ||
# Секция плагинов / Plugins section | ||
[plugins] | ||
# Пример 1 - строчка | ||
# Example 1 - single line | ||
vc1 = {version = "ail5iPUK", chanel = "stable", freez = true, update = false} | ||
|
||
# Пример 2 - строчка | ||
# Example 2 - single line | ||
cooler1 = {source = "Spigot", version = "ail5iPUK", chanel = "Beta", freez = false, update = false} | ||
|
||
# Пример 3 - строчка | ||
# Example 3 - single line | ||
best_plugin_without_any_param1 = {} | ||
|
||
# Пример 1 - секция | ||
# Example 1 - section | ||
[plugins.simple_voice_chat2] | ||
version = "ail5iPUK" | ||
chanel = "Stable" | ||
freez = false | ||
update = false | ||
|
||
# Пример 2 - секция | ||
# Example 2 - section | ||
[plugins.cooler2] | ||
source = "Spigot" | ||
version = "ail5iPUK" | ||
|
@@ -40,17 +51,21 @@ | |
update = true | ||
|
||
# Пример 3 - секция | ||
# Example 3 - section | ||
[plugins.best_plugin_without_any_param2] | ||
#Дефолт: | ||
#Дефолт: / Default: | ||
#source = Modrith | ||
#version = "Latest" | ||
#chanel = "Stable" | ||
#freez = false | ||
#update = false | ||
|
||
# Секция дополнений | ||
# Additions section | ||
[additions] | ||
#Git link для конфига | ||
# Git link для конфига | ||
# Git link for the config | ||
configPluguinsFrom = "[email protected]:TOwInOK/test.git" | ||
#Ключ если в привате | ||
# Ключ если в привате | ||
# Key if in private | ||
key = "SUPEREKLy" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,15 +1,9 @@ | ||
use serde::{Deserialize, Serialize}; | ||
#[derive(Deserialize, Serialize, Debug)] | ||
#[derive(Deserialize, Serialize, Debug, Default)] | ||
pub struct Additions { | ||
// git link | ||
#[serde(rename = "configPluguinsFrom")] | ||
config_plugins_from: String, | ||
// git key | ||
key: String, | ||
} | ||
|
||
impl Default for Additions { | ||
fn default() -> Self { | ||
Self { config_plugins_from: Default::default(), key: Default::default() } | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
use crate::config::Versions; | ||
use serde::{Deserialize, Serialize}; | ||
#[derive(Deserialize, Serialize, Debug, Default)] | ||
pub struct Core { | ||
// Ядро | ||
#[serde(default)] | ||
pub provider: Provider, | ||
// Версия ядра | ||
#[serde(default)] | ||
pub version: Versions, | ||
// Приостановить обновление | ||
#[serde(default)] | ||
pub freeze: bool, | ||
// Нужно обновить | ||
#[serde(default)] | ||
pub force_update: bool, | ||
} | ||
|
||
#[derive(Deserialize, Serialize, Debug, Default)] | ||
pub enum Provider { | ||
#[default] | ||
Vanilla, | ||
Bucket, | ||
Spigot, | ||
Paper, | ||
Purpur, | ||
Fabric, | ||
Forge, | ||
NeoForge, | ||
} |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
Oops, something went wrong.