credentialprovider

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Dec 2, 2024 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package credentialprovider includes Functions copied from https://github.com/kubernetes/kubernetes/blob/v1.26.1/pkg/credentialprovider/keyring.go#L160-L233. These functions have been copied over so as not to add k8s.io/kubernetes as a module dependency.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseSchemelessURL

func ParseSchemelessURL(schemelessURL string) (*url.URL, error)

ParseSchemelessURL parses a schemeless url and returns a url.URL url.Parse require a scheme, but ours don't have schemes. Adding a scheme to make url.Parse happy, then clear out the resulting scheme.

func SplitURL

func SplitURL(u *url.URL) (parts []string, port string)

SplitURL splits the host name into parts, as well as the port.

func URLMatchesACR

func URLMatchesACR(target string) (bool, error)

func URLMatchesECR

func URLMatchesECR(target string) (bool, error)

func URLMatchesGCR

func URLMatchesGCR(target string) (bool, error)

func URLMatchesKnownRegistryProvider

func URLMatchesKnownRegistryProvider(target string) (bool, error)

func URLMatchesOneOfGlobs

func URLMatchesOneOfGlobs(globs []string, target string) (bool, error)

func URLsMatch

func URLsMatch(globURL, targetURL *url.URL) (bool, error)

URLsMatch checks whether the given target url matches the glob url, which may have glob wild cards in the host name.

Examples:

globURL=*.docker.io, targetURL=blah.docker.io => match
globURL=*.docker.io, targetURL=not.right.io   => no match

Note that we don't support wildcards in ports and paths yet.

func URLsMatchStr

func URLsMatchStr(glob, target string) (bool, error)

URLsMatchStr is wrapper for URLsMatch, operating on strings instead of URLs.

Types

This section is empty.

Jump to

Keyboard shortcuts

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