Package imagedownloads implements image-downloads metadata from simplestreams.
const ( // DataType is the simplestreams datatype. DataType = "image-downloads" )
DefaultSource creates a new signed simplestreams datasource for use with the image-downloads datatype.
Filter collects only matching products. Series and Arch are filtered by imagemetadata.ImageConstraints. So this really only let's us filter on a file type.
NewDataSource returns a new simplestreams.DataSource from the provided baseURL. baseURL MUST include the image stream.
Sort sorts a slice of ImageMetadata in ascending order of their id in order to ensure the results of Fetch are ordered deterministically.
Metadata models the information about a particular cloud image download product.
func Fetch( src simplestreams.DataSource, cons *imagemetadata.ImageConstraint, ff simplestreams.AppendMatchingFunc) (*Metadata, *simplestreams.ResolveInfo, error)
Fetch gets product results as Metadata from the provided datasources, given some constraints and an optional filter function.
func One(arch, release, stream, ftype string, src func() simplestreams.DataSource) (*Metadata, error)
One gets Metadata for one content download item: The most recent of:
- architecture - OS release - Simplestreams stream - File image type.
src exists to pass in a data source for testing.
DownloadURL returns the URL representing the image.