const ( InsertAction = "INSERT" PromotionTrue = "true" PromotionsTopic = "promotions" )
const ( PromoteTag = "promote" Latest = "latest" )
const (
WarehouseRepo = "warehouse"
)
var Attributes = map[string]string{ "promotion": "true", }
func Promote(ctx context.Context, cfg *Config, pl packagelock.PackageLock, ps types.PubSubService) ([]string, error)
func Run(ctx context.Context, log logr.Logger) error
type Config struct { LockFile string AllPackages bool SourceRepo Repository DestinationRepo Repository ForwarderProjectID string // contains filtered or unexported fields }
func (cfg Config) Description() string
func (cfg Config) String() string
func (cfg Config) Validate() error
repository represents a GAR repository instance
type Repository struct { Name string // name of the GAR repository instance, e.g. warehouse ProjectID string // project-id where GAR registry exists, e.g. ret-edge-stage1-foreman Registry string // the OCI compliant registry, e.g. us-east1-docker.pkg.dev Ref string // full GAR repository reference, e.g. us-east1-docker.pkg.dev/ret-edge-stage1-foreman/warehouse }
func (repo Repository) EnsurePackageDigestExists(pkgName string, digest string) error
Finds the hash for the latest version of the package in the repository
func (repo Repository) GetLatestPackageVersion(pkgName string) (string, error)
Finds the hash for the latest version of the package in the repository
func (repo Repository) ListPackages(ctx context.Context) (pkgNames []string, err error)
Lists the packages in the repository
func (repo Repository) NewPackageDigest(pkgName, version string) (name.Digest, error)
Return the full reference for a given package and its tag
func (repo Repository) NewPackageTag(pkgName, tag string) (name.Tag, error)
Return the full reference for a given package and its tag
func (repo Repository) PackageDigestRef(pkgName, version string) string
Return the full reference for a given package and its digest
func (repo Repository) PackageTagRef(pkgName, version string) string
Return the full reference for a given package and its tag
func (repo Repository) PackageTagRefs(pkgName string, tags []string) []string
Return the full reference for a given package and its version ("latest" or hash)
func (repo Repository) String() string