Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( //remove leading slash because that will not be present in tar MetaPath = strings.TrimPrefix(fp.Join(strs.ConfDir(), "imgmeta.json"), "/") )
Functions ¶
func ReadRaw ¶
ReadRaw reads a metadata file embedded at the beginning of a .upd (tar.xz) archive, returning the raw data, which is encoded as json. See also: Read()
This metadata contains more information than available in the (current) filename format. Ensuring a file comes first in a tarball is as simple as listing it first on the tar command line; it has the side effect of causing the file to appear twice in the archive but this seems to cause no problems. I think if the two were different that the 2nd would overwrite the first, given the historical use of tar (Tape ARchive).
Types ¶
type ImgMeta ¶
type ImgMeta struct { BinVer string BinTime string ImportJob string ImgJob string ImgName string Stream string }
ImgMeta is embedded in a .upd file, and describes the image and CI job. CI env vars are the source of most of these values.