Struct octorust::packages::Packages[][src]

pub struct Packages { /* fields omitted */ }

Implementations

Get a package for an organization.

This function performs a GET to the /orgs/{org}/packages/{package_type}/{package_name} endpoint.

Gets a specific package in an organization.

To use this endpoint, you must authenticate using an access token with the packages:read scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#get-a-package-for-an-organization

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • org: &str

Delete a package for an organization.

This function performs a DELETE to the /orgs/{org}/packages/{package_type}/{package_name} endpoint.

Deletes an entire package in an organization. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.

To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read scope. In addition:

  • If package_type is not container, your token must also include the repo scope.
  • If package_type is container, you must also have admin permissions to the container you want to delete.

FROM: https://docs.github.com/rest/reference/packages#delete-a-package-for-an-organization

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • org: &str

Restore a package for an organization.

This function performs a POST to the /orgs/{org}/packages/{package_type}/{package_name}/restore endpoint.

Restores an entire package in an organization.

You can restore a deleted package under the following conditions:

  • The package was deleted within the last 30 days.
  • The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.

To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read and packages:write scope. In addition:

  • If package_type is not container, your token must also include the repo scope.
  • If package_type is container, you must also have admin permissions to the container that you want to restore.

FROM: https://docs.github.com/rest/reference/packages#restore-a-package-for-an-organization

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • org: &str
  • token: &str – package token.

Get all package versions for a package owned by an organization.

This function performs a GET to the /orgs/{org}/packages/{package_type}/{package_name}/versions endpoint.

Returns all package versions for a package owned by an organization.

To use this endpoint, you must authenticate using an access token with the packages:read scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-an-organization

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • org: &str
  • page: i64 – Page number of the results to fetch.
  • per_page: i64 – Results per page (max 100).
  • state: crate::types::PackagesGetAllPackageVersionsOwnedByOrgState – The state of the package, either active or deleted.

Get all package versions for a package owned by an organization.

This function performs a GET to the /orgs/{org}/packages/{package_type}/{package_name}/versions endpoint.

As opposed to get_all_package_versions_for_package_owned_by_org, this function returns all the pages of the request at once.

Returns all package versions for a package owned by an organization.

To use this endpoint, you must authenticate using an access token with the packages:read scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-an-organization

Get a package version for an organization.

This function performs a GET to the /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id} endpoint.

Gets a specific package version in an organization.

You must authenticate using an access token with the packages:read scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#get-a-package-version-for-an-organization

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • org: &str
  • package_version_id: i64 – Unique identifier of the package version.

Delete package version for an organization.

This function performs a DELETE to the /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id} endpoint.

Deletes a specific package version in an organization. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.

To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read scope. In addition:

  • If package_type is not container, your token must also include the repo scope.
  • If package_type is container, you must also have admin permissions to the container you want to delete.

FROM: https://docs.github.com/rest/reference/packages#delete-a-package-version-for-an-organization

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • org: &str
  • package_version_id: i64 – Unique identifier of the package version.

Restore package version for an organization.

This function performs a POST to the /orgs/{org}/packages/{package_type}/{package_name}/versions/{package_version_id}/restore endpoint.

Restores a specific package version in an organization.

You can restore a deleted package under the following conditions:

  • The package was deleted within the last 30 days.
  • The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.

To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read and packages:write scope. In addition:

  • If package_type is not container, your token must also include the repo scope.
  • If package_type is container, you must also have admin permissions to the container that you want to restore.

FROM: https://docs.github.com/rest/reference/packages#restore-a-package-version-for-an-organization

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • org: &str
  • package_version_id: i64 – Unique identifier of the package version.

Get a package for the authenticated user.

This function performs a GET to the /user/packages/{package_type}/{package_name} endpoint.

Gets a specific package for a package owned by the authenticated user.

To use this endpoint, you must authenticate using an access token with the packages:read scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#get-a-package-for-the-authenticated-user

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.

Delete a package for the authenticated user.

This function performs a DELETE to the /user/packages/{package_type}/{package_name} endpoint.

Deletes a package owned by the authenticated user. You cannot delete a public package if any version of the package has more than 5,000 downloads. In this scenario, contact GitHub support for further assistance.

To use this endpoint, you must authenticate using an access token with the packages:read and packages:delete scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#delete-a-package-for-the-authenticated-user

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.

Restore a package for the authenticated user.

This function performs a POST to the /user/packages/{package_type}/{package_name}/restore endpoint.

Restores a package owned by the authenticated user.

You can restore a deleted package under the following conditions:

  • The package was deleted within the last 30 days.
  • The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.

To use this endpoint, you must authenticate using an access token with the packages:read and packages:write scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#restore-a-package-for-the-authenticated-user

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • token: &str – package token.

Get all package versions for a package owned by the authenticated user.

This function performs a GET to the /user/packages/{package_type}/{package_name}/versions endpoint.

Returns all package versions for a package owned by the authenticated user.

To use this endpoint, you must authenticate using an access token with the packages:read scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • page: i64 – Page number of the results to fetch.
  • per_page: i64 – Results per page (max 100).
  • state: crate::types::PackagesGetAllPackageVersionsOwnedByOrgState – The state of the package, either active or deleted.

Get all package versions for a package owned by the authenticated user.

This function performs a GET to the /user/packages/{package_type}/{package_name}/versions endpoint.

As opposed to get_all_package_versions_for_package_owned_by_authenticated_user, this function returns all the pages of the request at once.

Returns all package versions for a package owned by the authenticated user.

To use this endpoint, you must authenticate using an access token with the packages:read scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-the-authenticated-user

Get a package version for the authenticated user.

This function performs a GET to the /user/packages/{package_type}/{package_name}/versions/{package_version_id} endpoint.

Gets a specific package version for a package owned by the authenticated user.

To use this endpoint, you must authenticate using an access token with the packages:read scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#get-a-package-version-for-the-authenticated-user

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • package_version_id: i64 – Unique identifier of the package version.

Delete a package version for the authenticated user.

This function performs a DELETE to the /user/packages/{package_type}/{package_name}/versions/{package_version_id} endpoint.

Deletes a specific package version for a package owned by the authenticated user. If the package is public and the package version has more than 5,000 downloads, you cannot delete the package version. In this scenario, contact GitHub support for further assistance.

To use this endpoint, you must have admin permissions in the organization and authenticate using an access token with the packages:read scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#delete-a-package-version-for-the-authenticated-user

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • package_version_id: i64 – Unique identifier of the package version.

Restore a package version for the authenticated user.

This function performs a POST to the /user/packages/{package_type}/{package_name}/versions/{package_version_id}/restore endpoint.

Restores a package version owned by the authenticated user.

You can restore a deleted package version under the following conditions:

  • The package was deleted within the last 30 days.
  • The same package namespace and version is still available and not reused for a new package. If the same package namespace is not available, you will not be able to restore your package. In this scenario, to restore the deleted package, you must delete the new package that uses the deleted package’s namespace first.

To use this endpoint, you must authenticate using an access token with the packages:read and packages:write scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#restore-a-package-version-for-the-authenticated-user

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • package_version_id: i64 – Unique identifier of the package version.

Get a package for a user.

This function performs a GET to the /users/{username}/packages/{package_type}/{package_name} endpoint.

Gets a specific package metadata for a public package owned by a user.

To use this endpoint, you must authenticate using an access token with the packages:read scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#get-a-package-for-a-user

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • username: &str

Get all package versions for a package owned by a user.

This function performs a GET to the /users/{username}/packages/{package_type}/{package_name}/versions endpoint.

Returns all package versions for a public package owned by a specified user.

To use this endpoint, you must authenticate using an access token with the packages:read scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-a-user

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • username: &str

Get all package versions for a package owned by a user.

This function performs a GET to the /users/{username}/packages/{package_type}/{package_name}/versions endpoint.

As opposed to get_all_package_versions_for_package_owned_by_user, this function returns all the pages of the request at once.

Returns all package versions for a public package owned by a specified user.

To use this endpoint, you must authenticate using an access token with the packages:read scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#get-all-package-versions-for-a-package-owned-by-a-user

Get a package version for a user.

This function performs a GET to the /users/{username}/packages/{package_type}/{package_name}/versions/{package_version_id} endpoint.

Gets a specific package version for a public package owned by a specified user.

At this time, to use this endpoint, you must authenticate using an access token with the packages:read scope. If package_type is not container, your token must also include the repo scope.

FROM: https://docs.github.com/rest/reference/packages#get-a-package-version-for-a-user

Parameters:

  • package_type: crate::types::PackageType – The type of supported package. Can be one of npm, maven, rubygems, nuget, docker, or container. Packages in GitHub’s Gradle registry have the type maven. Docker images pushed to GitHub’s Container registry (ghcr.io) have the type container. You can use the type docker to find images that were pushed to GitHub’s Docker registry (docker.pkg.github.com), even if these have now been migrated to the Container registry.
  • package_name: &str – The name of the package.
  • package_version_id: i64 – Unique identifier of the package version.
  • username: &str

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more

Immutably borrows from an owned value. Read more

Mutably borrows from an owned value. Read more

Performs the conversion.

Instruments this type with the provided Span, returning an Instrumented wrapper. Read more

Instruments this type with the current Span, returning an Instrumented wrapper. Read more

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.

The type returned in the event of a conversion error.

Performs the conversion.