godo.Registry.ListGarbageCollections()
Generated on 5 Nov 2026
from godo version
v1.236.0
Usage
client.Registry.ListGarbageCollections(ctx context.Context, registry string, opts *godo.ListOptions) ([]*godo.GarbageCollection, *godo.Response, error)Description
ListGarbageCollections retrieves all garbage collections (active and
inactive) for the specified registry.
This method sends a GET request to /v2/registry/{}/garbage-collections.
Parameters
registrystring requiredopts*godo.ListOptions
Fields of godo.ListOptions
ListOptions specifies the optional parameters to various List methods that
support pagination.
PageintFor paginated result sets, page of results to retrieve.
PerPageintFor paginated result sets, the number of results to include per page.
WithProjectsboolWhether App responses should include project_id fields. The field will be empty if false or if omitted. (ListApps)
DeployedboolThis parameter is used to only list agents that are deployed in the response.
PublicOnlyboolThis parameter is used to include models that are publicly available.
Usecases[]stringThis parameter is used to include models according to the use cases.
Returns
- []*godo.GarbageCollection
- *godo.Response
The HTTP response, with pagination
Links,Meta, andRatelimit information.- error
Non-nil when the request fails. API errors are returned as
*godo.ErrorResponse.
Fields of godo.GarbageCollection
GarbageCollection represents a garbage collection.
UUIDstringRegistryNamestringStatusstringTypegodo.GarbageCollectionTypeCreatedAttime.TimeUpdatedAttime.TimeBlobsDeleteduint64FreedBytesuint64
Request Sample
Pagination
This method returns one page of results. Response.Links carries the pagination state; loop until IsLastPage reports true.
Response Example
More Information
See GET /v2/registry/{}/garbage-collections in the API reference for additional detail on responses, headers, parameters, and more.
See the Go package documentation for the source of this method.