repository

package
v0.18.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 3, 2026 License: MIT Imports: 17 Imported by: 0

Documentation

Overview

Package repository provides functions for managing container registry repositories, including manifest operations, tag filtering, and dependency resolution.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func BuildRegexFilter

func BuildRegexFilter(expression string, regexpMatchTimeoutSeconds int64) (*regexp2.Regexp, error)

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

func GetRepositoryAndTagRegex(filter string) (string, string, error)

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL