Interface PackagesManagement
- All Known Implementing Classes:
PackagesManagementImpl
public interface PackagesManagement
PackagesManagement provides a way to manage the packages of function, sink, and source.
-
Method Summary
Modifier and TypeMethodDescriptiondelete(PackageName packageName) Delete a package.download(PackageName packageName, OutputStream outputStream) Download a package of a given version to a given path.getMeta(PackageName packageName) Get the metadata of a package.voidinitialize(PackagesStorage storage) Initialize the packages management service with the given storage.list(PackageName packageName) List all the versions of a package.list(PackageType type, String tenant, String namespace) List all the packages with the type of a namespace.updateMeta(PackageName packageName, PackageMetadata metadata) Update the metadata of a package.upload(PackageName packageName, PackageMetadata metadata, InputStream inputStream) Upload a package of a given version from a given path.
-
Method Details
-
initialize
Initialize the packages management service with the given storage.- Parameters:
storage- the storage used to saving packages
-
getMeta
Get the metadata of a package.- Parameters:
packageName- package name- Returns:
-
updateMeta
Update the metadata of a package.- Parameters:
packageName- package namemetadata-- Returns:
-
download
Download a package of a given version to a given path.- Parameters:
packageName- package nameoutputStream-- Returns:
-
upload
CompletableFuture<Void> upload(PackageName packageName, PackageMetadata metadata, InputStream inputStream) Upload a package of a given version from a given path.- Parameters:
packageName- package namemetadata- metadata of a packageinputStream-- Returns:
-
delete
Delete a package. It will delete all versions of a package if the version is not specified. Otherwise it will delete the specified version package.- Parameters:
packageName- package name type://tenant/namespace/name@version is delete a given version of the package type://tenant/namespace/name is delete all versions of the package- Returns:
-
list
List all the versions of a package.- Parameters:
packageName- package name without version- Returns:
- all the versions of the specified package
-
list
List all the packages with the type of a namespace.- Parameters:
type- the package typetenant- the tenant namenamespace- the namespace name- Returns:
- the packages name under the specified namespace
-