Documentation
¶
Overview ¶
Package repository provides functions for managing container registry repositories, including manifest operations, tag filtering, and dependency resolution.
Index ¶
- func BuildRegexFilter(expression string, regexpMatchTimeoutSeconds int64) (*regexp2.Regexp, error)
- func CollectTagFilters(ctx context.Context, rawFilters []string, client acrapi.BaseClientAPI, ...) (map[string]string, error)
- func GetAllRepositoryNames(ctx context.Context, client acrapi.BaseClientAPI, pageSize int32) ([]string, error)
- func GetLastTagFromResponse(resultTags *acr.RepositoryTagsType) string
- func GetMatchingRepos(repoNames []string, repoRegex string, regexMatchTimeout int64) ([]string, error)
- func GetRepositoryAndTagRegex(filter string) (string, string, error)
- func GetUntaggedManifests(ctx context.Context, poolSize int, acrClient api.AcrCLIClientInterface, ...) ([]acr.ManifestAttributesBase, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func BuildRegexFilter ¶
BuildRegexFilter compiles a regex state machine from a regex expression
func CollectTagFilters ¶
func CollectTagFilters(ctx context.Context, rawFilters []string, client acrapi.BaseClientAPI, regexMatchTimeout int64, repoPageSize int32) (map[string]string, error)
CollectTagFilters collects all matching repos and collects the associated tag filters
func GetAllRepositoryNames ¶
func GetAllRepositoryNames(ctx context.Context, client acrapi.BaseClientAPI, pageSize int32) ([]string, error)
GetAllRepositoryNames retrieves all repository names from the registry using pagination.
func GetLastTagFromResponse ¶
func GetLastTagFromResponse(resultTags *acr.RepositoryTagsType) string
GetLastTagFromResponse extracts the last tag from pagination headers in the response.
func GetMatchingRepos ¶
func GetMatchingRepos(repoNames []string, repoRegex string, regexMatchTimeout int64) ([]string, error)
GetMatchingRepos get all repositories in current registry, that match the provided regular expression
func GetRepositoryAndTagRegex ¶
GetRepositoryAndTagRegex splits the strings that are in the form <repository>:<regex filter>
func GetUntaggedManifests ¶
func GetUntaggedManifests(ctx context.Context, poolSize int, acrClient api.AcrCLIClientInterface, repoName string, preserveAllOCIManifests bool, manifestToDeletedTagsCountMap map[string]int, dryRun bool, includeLocked bool, deleteCutoff *time.Time) ([]acr.ManifestAttributesBase, error)
GetUntaggedManifests gets all the manifests for the command to be executed on. The command will be executed on this manifest if it does not have any tag and does not form part of a manifest list that has tags referencing it. If the purge command is to be executed, the manifest should also not have a tag and not have a subject manifest. Param manifestToTagsCountMap is an optional map that can be used to pass the count of tags for each manifest that we know would be deleted if the command is exectued under dryRun conditions. Its ignored if the dryRun flag is false.
Types ¶
This section is empty.