Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func HasDockerLocator ¶
func ParseIDLocator ¶
ParseIDLocator parses a buildpack locator in the following formats into its ID and version.
- <id>[@<version>]
- urn:cnb:builder:<id>[@<version>]
- urn:cnb:registry:<id>[@<version>]
- from=builder:<id>[@<version>] (deprecated)
If version is omitted, the version returned will be empty. Any "from=builder:" or "urn:cnb" prefix will be ignored.
func ParsePackageLocator ¶
ParsePackageLocator parses a locator (in format `[docker://][<host>/]<path>[:<tag>⏐@<digest>]`) to image name (`[<host>/]<path>[:<tag>⏐@<digest>]`)
func ParseRegistryID ¶
ParseRegistryID parses a registry id (ie. `<namespace>/<name>@<version>`) into namespace, name and version components.
Supported formats:
- <ns>/<name>[@<version>]
- urn:cnb:registry:<ns>/<name>[@<version>]
Types ¶
type LocatorType ¶
type LocatorType int
const ( InvalidLocator LocatorType = iota FromBuilderLocator URILocator IDLocator PackageLocator RegistryLocator )
func GetLocatorType ¶
func GetLocatorType(locator string, relativeBaseDir string, buildpacksFromBuilder []dist.BuildpackInfo) (LocatorType, error)
GetLocatorType determines which type of locator is designated by the given input. If a type cannot be determined, `INVALID_LOCATOR` will be returned. If an error is encountered, it will be returned.
func (LocatorType) String ¶
func (l LocatorType) String() string