Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // DefaultVersion is the default version we use for a Manifest if we cant parse it DefaultVersion = version.Must(version.NewVersion("0.0.0")) // GitShaRegex is the anchored regex that a pure commit sha matches GitShaRegex = regexp.MustCompile(`^[0-9a-f]{4,}$`) )
Functions ¶
This section is empty.
Types ¶
type Manifest ¶
type Manifest struct { Name string Tag string //FSLayers []*schema1.FSLayer // LastModified is a synthesized field we extract from History via `lastModified` LastModified time.Time // Version is a sortable version field, derived from Tag Version *version.Version Labels map[string]string }
Manifest is a combined struct of a v1 manifest, as well as some interesting fields we layer on top.
func DedupeManifests ¶
DedupeManifests will deduplicate a list of Manifests by name:tag
func FromSignedManifest ¶
func FromSignedManifest(sm *schema1.SignedManifest) (*Manifest, error)
FromSignedManifest does some parsing and field extraction from the underlying SignedManifest and returns our sugar object
func NewManifest ¶
func NewManifest(repo string, tag string, lm time.Time, labels map[string]string) (*Manifest, error)
NewManifest creates a new Manifest
func RemoveItems ¶
removes all items in b from a, returning the list (a-b) this is super shitty timecomplexity but i really dont care
type ManifestModifiedCollection ¶
type ManifestModifiedCollection []*Manifest
ManifestModifiedCollection is a type that implements the sort.Interface interface so that Manifests can be sorted by modification time
func (ManifestModifiedCollection) Len ¶
func (v ManifestModifiedCollection) Len() int
func (ManifestModifiedCollection) Less ¶
func (v ManifestModifiedCollection) Less(i, j int) bool
func (ManifestModifiedCollection) Swap ¶
func (v ManifestModifiedCollection) Swap(i, j int)
type ManifestVersionCollection ¶
type ManifestVersionCollection []*Manifest
ManifestVersionCollection is a type that implements the sort.Interface interface so that versions can be sorted.
func (ManifestVersionCollection) Len ¶
func (v ManifestVersionCollection) Len() int
func (ManifestVersionCollection) Less ¶
func (v ManifestVersionCollection) Less(i, j int) bool
func (ManifestVersionCollection) Swap ¶
func (v ManifestVersionCollection) Swap(i, j int)