tagcheck

package
v2.3.5 Latest Latest
Warning

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

Go to latest
Published: Oct 25, 2023 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var QuayAPIEndpoint = "https://quay.io/api/v1/repository/%s/tag/%s/images"

QuayAPIEndpoint is the quay.io API endpoint used to look up tags: https://docs.quay.io/api/swagger/#!/tag - Any successful response indicates the tag exists - A 404 response means the tag does not exist This API call requires a valid OAuth bearer token with repo:read permissions

Functions

This section is empty.

Types

type Checker

type Checker struct {
	Quay *QuayChecker
	ECR  *ECRChecker
}

func (*Checker) AllTagsExist

func (c *Checker) AllTagsExist(tags []string, repo string) (bool, []string, error)

type ECRChecker

type ECRChecker struct {
	AccessKeyID, SecretAccessKey string // AWS credentials scoped to ECR only
	ECRClientFactoryFunc         func(s *session.Session) ecriface.ECRAPI
}

func (ECRChecker) AllTagsExist

func (r ECRChecker) AllTagsExist(tags []string, repo string) (bool, []string, error)

AllTagsExist returns whether all tags exist in repo ([ecr server url]/[repo name]), and returns missing tags (if any)

func (ECRChecker) IsECR

func (r ECRChecker) IsECR(repo string) bool

IsECR returns whether repo (owner/url/[name]) is an ECR image repository

type FakeChecker

type FakeChecker struct {
	AllTagsExistFunc func(tags []string, repo string) (bool, []string, error)
}

func (*FakeChecker) AllTagsExist

func (fc *FakeChecker) AllTagsExist(tags []string, repo string) (bool, []string, error)

type QuayChecker

type QuayChecker struct {
	APIToken string
	// contains filtered or unexported fields
}

func (QuayChecker) AllTagsExist

func (qc QuayChecker) AllTagsExist(tags []string, repo string) (bool, []string, error)

AllTagsExist returns whether all tags exist in repo (quay.io/[repo name]), and returns missing tags (if any)

func (QuayChecker) IsQuay

func (qc QuayChecker) IsQuay(repo string) bool

IsQuay returns whether repo is hosted on quay.io

Jump to

Keyboard shortcuts

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