pkg

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Apr 18, 2023 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

View Source
const DefaultPrTagPattern = "^pr-(\\d+).*"

Variables

This section is empty.

Functions

func Clean

func Clean(ghClient GithubClient, prFilterParams PullRequestFilterParams, regClient ContainerRegistryClient, pkgRegistryParams PackageRegistryParams, dryRun bool) error

Types

type ContainerRegistryClient

type ContainerRegistryClient interface {
	GetRegistryObjectFromHash(repository, hash string) (v1.Image, v1.ImageIndex, error)

	DeleteRegistryObject(repository, hash string) error
}

func NewContainerRegistryClient

func NewContainerRegistryClient(userName, password string) (ContainerRegistryClient, error)

NewContainerRegistryClient returns an initialized OCI container registry client

type GithubClient

type GithubClient interface {
	GetAllContainerPackages(user string) ([]*github.Package, error)

	GetAllContainerPackageVersions(user, packageName string) ([]*github.PackageVersion, error)

	DeleteContainerPackageVersion(user, packageName string, id int64) error

	GetPullRequestState(owner, repository string, id int) (string, error)
}

func NewGithubClient

func NewGithubClient(ctx context.Context, token string) (GithubClient, error)

NewGithubClient returns an initialized GitHub client

type PackageRegistryParams

type PackageRegistryParams struct {
	Registry    string
	User        string
	PackageName string
}

type PullRequestFilterParams

type PullRequestFilterParams struct {
	Owner      string
	Repository string
	TagRegex   *regexp.Regexp
}

Jump to

Keyboard shortcuts

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