|
@@ -9,18 +9,23 @@ use std::io::Write;
|
|
|
|
|
|
use home::home_dir;
|
|
|
|
|
|
-use crate::repository::{
|
|
|
+
|
|
|
+use crate::lib::repository::{
|
|
|
Repository
|
|
|
};
|
|
|
|
|
|
-use crate::repotype::{
|
|
|
+use crate::lib::repotype::{
|
|
|
RepoType
|
|
|
};
|
|
|
|
|
|
-use crate::action::{
|
|
|
+use crate::lib::action::{
|
|
|
Action
|
|
|
};
|
|
|
|
|
|
+use crate::lib::group::{
|
|
|
+ Group
|
|
|
+};
|
|
|
+
|
|
|
#[derive(Serialize, Deserialize)]
|
|
|
pub struct Config {
|
|
|
#[serde(rename(serialize = "repo_type", deserialize = "repo_type"), default)]
|
|
@@ -33,16 +38,6 @@ pub struct Config {
|
|
|
groups: HashMap<String, Group>,
|
|
|
}
|
|
|
|
|
|
-#[derive(Serialize, Deserialize)]
|
|
|
-pub struct Group {
|
|
|
- #[serde(default)]
|
|
|
- name: String,
|
|
|
- #[serde(default)]
|
|
|
- actions_after: Vec<String>,
|
|
|
- #[serde(default)]
|
|
|
- members: Vec<String>,
|
|
|
-}
|
|
|
-
|
|
|
pub fn find_config_file(original: Option<&str>) -> PathBuf {
|
|
|
match original {
|
|
|
None => {
|