Layer 0 Schema
Layer 0 of the design is a simple spec for how to refer to snapshots of data.
(Refer to the Design chapter if further contextualization is required.)
Schema
The key concept at Layer 0 is the WareID
.
## WareID is semantically a "{packtype}:{hash}" tuple, colon-delimited,
## but we treat it as a string throughout the API for simplicity in using
## WareID as a key in maps.
type WareID string
## PackType is an enumeration of known ways for packing
## a Fileset into a Ware (and hashing it into a WareID).
## See repeatr.io/glossary if these terms are unfamiliar.
type PackType enum {
| "tar"
| "git"
| "zip"
# More values are possible; these are examples
# of ones that are well known today!
}
type PackFilter string
type AbsPath string
The schema for Layer 0 is pretty simple and pretty terse: we just need to declare that there exist some content identifiers; and we can handle them as strings. That’s all we need. (We’ll build interesting stuff out of this in Layer 1 – all those definitions will build upon these.)