github.com/axw/juju@v0.0.0-20161005053422-4bd6544d08d4/environs/simplestreams/export_test.go (about) 1 // Copyright 2013,2016 Canonical Ltd. 2 // Licensed under the AGPLv3, see LICENCE file for details. 3 4 package simplestreams 5 6 func ExtractCatalogsForProducts(metadata CloudMetadata, productIds []string) []MetadataCatalog { 7 return metadata.extractCatalogsForProducts(productIds) 8 } 9 10 func ExtractIndexes(ind Indices, ids []string) IndexMetadataSlice { 11 return ind.extractIndexes(ids) 12 } 13 14 func HasCloud(metadata IndexMetadata, cloud CloudSpec) bool { 15 return metadata.hasCloud(cloud) 16 } 17 18 func HasProduct(metadata IndexMetadata, prodIds []string) bool { 19 return metadata.hasProduct(prodIds) 20 } 21 22 func Filter(entries IndexMetadataSlice, match func(*IndexMetadata) bool) IndexMetadataSlice { 23 return entries.filter(match) 24 } 25 26 var FetchData = fetchData