PackageIndexAndCollections
PackageIndexAndCollections.swift:20struct PackageIndexAndCollections
Citizens in PackageCollections
Types
Type members
init(indexConfiguration: PackageIndexConfiguration, collectionsConfiguration: PackageCollections.Configuration, fileSystem: FileSystem, observabilityScope: ObservabilityScope
)
Instance members
func addCollection(PackageCollectionsModel.CollectionSource, order: Int?, trustConfirmationProvider: ((PackageCollectionsModel.Collection, @escaping (Bool) -> Void) -> Void)?
) async throws -> PackageCollectionsModel.Collection func addCollection(PackageCollectionsModel.CollectionSource, order: Int?, trustConfirmationProvider: ((PackageCollectionsModel.Collection, @escaping (Bool) -> Void) -> Void)?, callback: @escaping (Result<PackageCollectionsModel.Collection, Error>) -> Void
) func close(
) throws func findPackages(String, in: SearchIn
) async throws -> PackageCollectionsModel.PackageSearchResult func findPackages(String, in: SearchIn, callback: @escaping (Result<PackageCollectionsModel.PackageSearchResult, Error>) -> Void
) Finds and returns packages that match the query.
func findTargets(String, searchType: PackageCollectionsModel.TargetSearchType?, collections: Set<PackageCollectionsModel.CollectionIdentifier>?
) async throws -> PackageCollectionsModel.TargetSearchResult func findTargets(String, searchType: PackageCollectionsModel.TargetSearchType?, collections: Set<PackageCollectionsModel.CollectionIdentifier>?, callback: @escaping (Result<PackageCollectionsModel.TargetSearchResult, Error>) -> Void
) func getCollection(PackageCollectionsModel.CollectionSource
) async throws -> PackageCollectionsModel.Collection func getCollection(PackageCollectionsModel.CollectionSource, callback: @escaping (Result<PackageCollectionsModel.Collection, Error>) -> Void
) func getPackageMetadata(identity: PackageIdentity, location: String?, collections: Set<PackageCollectionsModel.CollectionIdentifier>?
) async throws -> PackageCollectionsModel.PackageMetadata func getPackageMetadata(identity: PackageIdentity, location: String?, collections: Set<PackageCollectionsModel.CollectionIdentifier>?, callback: @escaping (Result<PackageCollectionsModel.PackageMetadata, Error>) -> Void
) Returns metadata for the package identified by the given
PackageIdentity
, using package index (if configured) and collections data.func isIndexEnabled(
) -> Bool Indicates if package index is configured.
func listCollections(identifiers: Set<PackageCollectionsModel.CollectionIdentifier>?
) async throws -> [PackageCollectionsModel.Collection] func listCollections(identifiers: Set<PackageCollectionsModel.CollectionIdentifier>?, callback: @escaping (Result<[PackageCollectionsModel.Collection], Error>) -> Void
) func listPackages(collections: Set<PackageCollectionsModel.CollectionIdentifier>?
) async throws -> PackageCollectionsModel.PackageSearchResult func listPackages(collections: Set<PackageCollectionsModel.CollectionIdentifier>?, callback: @escaping (Result<PackageCollectionsModel.PackageSearchResult, Error>) -> Void
) func listPackagesInIndex(offset: Int, limit: Int
) async throws -> PackageCollectionsModel.PaginatedPackageList func listPackagesInIndex(offset: Int, limit: Int, callback: @escaping (Result<PackageCollectionsModel.PaginatedPackageList, Error>) -> Void
) func listTargets(collections: Set<PackageCollectionsModel.CollectionIdentifier>?
) async throws -> PackageCollectionsModel.TargetListResult func listTargets(collections: Set<PackageCollectionsModel.CollectionIdentifier>?, callback: @escaping (Result<PackageCollectionsModel.TargetListResult, Error>) -> Void
) func refreshCollection(PackageCollectionsModel.CollectionSource
) async throws -> PackageCollectionsModel.Collection func refreshCollection(PackageCollectionsModel.CollectionSource, callback: @escaping (Result<PackageCollectionsModel.Collection, Error>) -> Void
) func refreshCollections(
) async throws -> [PackageCollectionsModel.CollectionSource] func refreshCollections(callback: @escaping (Result<[PackageCollectionsModel.CollectionSource], Error>) -> Void
) func removeCollection(PackageCollectionsModel.CollectionSource
) async throws func removeCollection(PackageCollectionsModel.CollectionSource, callback: @escaping (Result<Void, Error>) -> Void
)