Documentation
¶
Index ¶
- Constants
- func AttachConnectorToTagOrDigest(tagOrDigest string) string
- func GCPTokenFromCreds(creds string) (string, time.Time, error)
- func IsGCRPermanentServiceAccountToken(registry string, username string) bool
- func RemoveEmptyItems(slice []string) []string
- func RepoMathPrefix(repo, prefix string) bool
- type Auth
- type CTXKey
- type RepoURL
Constants ¶
View Source
const (
DockerHubURL = "docker.io"
)
View Source
const Oauth2User = "_oauth2_"
Variables ¶
This section is empty.
Functions ¶
func AttachConnectorToTagOrDigest ¶ added in v1.5.0
func GCPTokenFromCreds ¶
GCPTokenFromCreds creates oauth2 token from permanent service account token
func IsGCRPermanentServiceAccountToken ¶
IsGCRPermanentServiceAccountToken returns true if user is a Google permanent service account token
func RemoveEmptyItems ¶ added in v1.4.1
func RepoMathPrefix ¶ added in v1.5.0
Types ¶
type Auth ¶ added in v1.5.0
type Auth struct {
Username string `json:"username" yaml:"username"`
Password string `json:"password" yaml:"password"`
Insecure bool `json:"insecure" yaml:"insecure"`
}
Auth describes the authentication information of a registry or a repository
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 ¶
GetRegistry returns the registry in a url
func (*RepoURL) GetRepoWithTagOrDigest ¶ added in v1.5.0
GetRepoWithTagOrDigest returns repository:tag in a url
func (*RepoURL) GetTagOrDigest ¶ added in v1.5.0
GetTagOrDigest returns the tag in a url
func (*RepoURL) GetURLWithoutTagOrDigest ¶ added in v1.5.0
Click to show internal directories.
Click to hide internal directories.