8da774af66
Signed-off-by: Christina Sørensen <christina@cafkafk.com>
3 KiB
3 KiB
Architecture
Architecture
Config datastructure
There were 3 major designs considered so far (here in chronological order).
Vec Based
Code sketch in https://github.com/cafkafk/seidr/commit/3d3b6d6646bda84333018cd621cd8bd6348b9cef
flowchart LR
Co[config]
Ca["categories (vec<category>)"]
L[links]
Co ==> Ca & L
Ca ----> c1(category 1) & c2(category 2) & c3(category 3)
subgraph Categories Vec
c1(category 1) ==> flags1 & repos1("repos (vec<GitRepo>)")
c2(category 2) ==> flags2 & repos2("repos (vec<GitRepo>)")
c3(category 3) ==> flags3 & repos3("repos (vec<GitRepo>)")
direction TB
subgraph GitRepos
repos1 --> gr1 & gr2 & gr3
repos2 --> gr4 & gr5 & gr6
repos3 --> gr7 & gr8 & gr9
end
direction TB
subgraph Flags Enum
flags1 & flags2 & flags3 -. any of .- Push & Clone
end
end
BTreeMap Based (nested)
flowchart LR
Co[config]
Ca["categories (BTreeMap)"]
L[links]
Co ==> Ca & L
Ca -- "unique_name/key" --> c1(category 1) & c2(category 2) & c3(category 3)
subgraph Categories BTreeMap
c1(category 1) ==> flags1 & repos1("repos (BTreeMap)")
c2(category 2) ==> flags2 & repos2("repos (BTreeMap)")
c3(category 3) ==> flags3 & repos3("repos (BTreeMap)")
direction TB
subgraph GitRepos
repos1 -- "unique_name/key" --> gr1 & gr2 & gr3
repos2 -- "unique_name/key" --> gr4 & gr5 & gr6
repos3 -- "unique_name/key" --> gr7 & gr8 & gr9
end
direction TB
subgraph Flags Enum
flags1 & flags2 & flags3 -. any of .- Push & Clone
end
end
BTreeMap Based (Store)
flowchart LR
S[(Store)]
subgraph Repo Store BMapTree
S -- "unique_name/key" ----> gr1 & gr2 & gr3
S -- "unique_name/key" ----> gr4 & gr5 & gr6
S -- "unique_name/key" ----> gr7 & gr8 & gr9
end
Co[config]
Ca["categories (BTreeMap)"]
L[links]
Co ==> Ca & L
Ca -- "unique_name/key" --> c1(category 1) & c2(category 2) & c3(category 3)
subgraph Categories BTreeMap
c1(category 1) ==> flags1 & repos1("repos (vec<keys>)")
c2(category 2) ==> flags2 & repos2("repos (vec<keys>)")
c3(category 3) ==> flags3 & repos3("repos (vec<keys>)")
direction TB
subgraph GitRepos
repos1 <-. "unique_name/key" .-> gr1 & gr2 & gr3 & gr4 & gr5 & gr6 & gr7 & gr8 & gr9
repos2 <-. "unique_name/key" .-> gr1 & gr2 & gr3 & gr4 & gr5 & gr6 & gr7 & gr8 & gr9
repos3 <-. "unique_name/key" .-> gr1 & gr2 & gr3 & gr4 & gr5 & gr6 & gr7 & gr8 & gr9
end
direction TB
subgraph Flags Enum
flags1 & flags2 & flags3 -. any of .- Push & Clone
end
end