diff options
| -rw-r--r-- | Project.toml | 1 | ||||
| -rw-r--r-- | src/Data.jl | 27 |
2 files changed, 28 insertions, 0 deletions
diff --git a/Project.toml b/Project.toml index 430531c..9a7177e 100644 --- a/Project.toml +++ b/Project.toml @@ -5,6 +5,7 @@ version = "0.1.0" [deps] ArgParse = "c7e460c6-2fb9-53a9-8c5b-16f535851c63" +Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" LinearAlgebra = "37e2e46d-f89d-539d-b4ee-838fcccc9c8e" REPL = "3fa0cd96-eef1-5676-8a61-b3b8758bbffb" TOML = "fa267f1f-6049-4f14-aa54-33bafae1ed76" 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 |
