Documentation
¶
Overview ¶
Package srcdir is where a stored file's versions live and whether a table's location lies among them (#2131, #2136).
A managed resource and a portal asset both keep every version of their file beneath a directory named by the source's id -- resources/{scope}/{owner}/{id}/... and {prefix}/{owner}/{id}/... -- so a table over any version of the file reads somewhere under that directory and a table over anything else does not. That is the one fact a table carries about where it came from, and what lets the platform recognize a table it made and has no record of.
Index ¶
- Constants
- func CandidateIDs(key string) []string
- func Describe(location string) string
- func Owns(bucket, id, headKey, location string) bool
- func Root(id, headKey string) string
- func Same(a, b string) bool
- func Split(location string) (bucket, key string, ok bool)
- func Under(location string, dirs []string) bool
Constants ¶
const Sep = "/"
Sep separates the segments of an object key.
Variables ¶
This section is empty.
Functions ¶
func CandidateIDs ¶
CandidateIDs are the path segments of a key that could name a stored file, deepest first: a file's directory is named by its id with at most a version directory beneath.
func Owns ¶
Owns reports whether location lies inside the directory the source with id, whose current file is headKey in bucket, keeps every version under.
func Root ¶
Root is the directory, with its trailing slash, named by id in the key of a source's current file, or "" when no directory is.
Types ¶
This section is empty.