utils

package
v1.5.4 Latest Latest
Warning

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

Go to latest
Published: Jan 17, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

View Source
const (
	DockerHubURL = "docker.io"
)

Variables

This section is empty.

Functions

func AttachConnectorToTagOrDigest added in v1.5.0

func AttachConnectorToTagOrDigest(tagOrDigest string) string

func RemoveDuplicateItems added in v1.5.3

func RemoveDuplicateItems(slice []string) []string

func RemoveEmptyItems added in v1.4.1

func RemoveEmptyItems(slice []string) []string

func RepoMathPrefix added in v1.5.0

func RepoMathPrefix(repo, prefix string) bool

Types

type CTXKey

type CTXKey string

type RepoURL

type RepoURL struct {
	// contains filtered or unexported fields
}

func GenerateRepoURLs added in v1.5.0

func GenerateRepoURLs(url string, externalTagsOrDigest func(registry, repository string,
) (tagsOrDigest []string, err error)) ([]*RepoURL, error)

GenerateRepoURLs creates a RepoURL slice. If url has no tags or digest, tags or digest should be provided by externalTagsOrDigest func, and empty slice will be returned if no tags or digest is provided.

func (*RepoURL) GetRegistry

func (r *RepoURL) GetRegistry() string

GetRegistry returns the registry in a url

func (*RepoURL) GetRepo

func (r *RepoURL) GetRepo() string

GetRepo returns the repository in a url

func (*RepoURL) GetRepoWithTagOrDigest added in v1.5.0

func (r *RepoURL) GetRepoWithTagOrDigest() string

GetRepoWithTagOrDigest returns repository:tag in a url

func (*RepoURL) GetTagOrDigest added in v1.5.0

func (r *RepoURL) GetTagOrDigest() string

GetTagOrDigest returns the tag in a url

func (*RepoURL) GetURLWithoutTagOrDigest added in v1.5.0

func (r *RepoURL) GetURLWithoutTagOrDigest() string

func (*RepoURL) HasDigest added in v1.5.0

func (r *RepoURL) HasDigest() bool

func (*RepoURL) String added in v1.5.0

func (r *RepoURL) String() string

GetURL returns the whole url

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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