aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorScott Lawrence <scott+git@ineffectivetheory.com>2024-06-21 22:04:47 -0600
committerScott Lawrence <scott+git@ineffectivetheory.com>2024-06-21 22:04:47 -0600
commitcd972df86d691f9e514fca74651f12dae87b24f8 (patch)
treebd93b6932cff4efd3b09ae8e304dcdd09e0f93fb /src
parent1c3897db6d17973a66985bb6fc0c3cac0e13a5e5 (diff)
downloadvatic-cd972df86d691f9e514fca74651f12dae87b24f8.tar.gz
vatic-cd972df86d691f9e514fca74651f12dae87b24f8.tar.bz2
vatic-cd972df86d691f9e514fca74651f12dae87b24f8.zip
First part of the data-downloading infrastructure
Diffstat (limited to 'src')
-rw-r--r--src/Data.jl27
1 files changed, 27 insertions, 0 deletions
diff --git a/src/Data.jl b/src/Data.jl
index c1323b6..951a1b2 100644
--- a/src/Data.jl
+++ b/src/Data.jl
@@ -1,5 +1,32 @@
module Data
+using Downloads: download
using TOML
+import Base: getindex, setindex
+
+struct Source
+end
+
+struct Index
+ filename::String
+ sources::Dict{String, Source}
+end
+
+function Index(filename::String)::Index
+ sources = Dict{String, Source}()
+ return Index(filename, sources)
+end
+
+function save(index::Index)
+end
+
+function getindex(index::Index, k::String)::Source
+ index.sources[k]
+end
+
+function setindex!(index::Index, k::String, s::Source)
+ index.sources[k] = s
+end
+
end