Interface HarborClient

All Known Implementing Classes:
HarborClientImpl

public interface HarborClient
  • Method Details

    • getVulnerabilitiesAddition

      NativeReportSummary getVulnerabilitiesAddition(String projectName, String repositoryName, String reference)
      Get the vulnerabilities addition of the specific artifact

      Get the vulnerabilities addition of the artifact specified by the reference under the project and repository.

      Parameters:
      projectName - The project name of Harbor
      repositoryName - The name of
      reference - The reference can be digest or tag.
    • getPing

      String getPing() throws IOException
      Ping Harbor to check if it's alive.

      This API simply replies a pong to indicate the process to handle API is up, disregarding the health status of dependent components.

      Returns:
      If the request succeeds, the 'Pong' string is returned
      Throws:
      IOException - The HTTP request failed
      HarborException - httpUrl is null
    • listAllRepositories

      Repository[] listAllRepositories() throws IOException
      List all authorized repositories
      Returns:
      Return to the list of repositories
      Throws:
      IOException
    • listArtifacts

      Artifact[] listArtifacts(String projectName, String repositoryName, @Nullable Map<String,String> extraParams) throws HarborException, IOException
      Throws:
      HarborException
      IOException
    • getArtifact

      Artifact getArtifact(String projectName, String repositoryName, String reference, @Nullable Map<String,String> extraParams) throws IOException
      Get the specific artifact

      Get the artifact specified by the reference under the project and repository. The reference can be digest or tag.

      Returns:
      Artifact Return artifact information
      Throws:
      IOException - The HTTP request failed
      HarborException - The apiUrl is null in getArtifact method