github.com/rogpeppe/juju@v0.0.0-20140613142852-6337964b789e/environs/simplestreams/export_test.go (about)

     1  // Copyright 2013 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) IndexMetadataSlice {
    11  	return ind.extractIndexes()
    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  }