import { PackageURL } from "packageurl-js"; import { Platform } from "./platform.js"; /** * Helper class for parsing docker repository/image names: * * - If the first part before the slash contains a "." or a ":" it is considered to be a registry URL * - A last part starting with a ":" is considered to be a tag * - The rest is considered the repository name (which might be separated via slashes) * * Example of valid names: * * - consol/tomcat-8.0 * - consol/tomcat-8.0:8.0.9 * - docker.consol.de:5000/tomcat-8.0 * - docker.consol.de:5000/jolokia/tomcat-8.0:8.0.9 */ export declare class Image { repository: string; registry: string; tag: string; digest: string | null; user: string; static NAME_COMPONENT_REGEXP: string; static DOMAIN_COMPONENT_REGEXP: string; static NAME_COMP_REGEXP: RegExp; static IMAGE_NAME_REGEXP: RegExp; static DOMAIN_REGEXP: RegExp; static TAG_REGEXP: RegExp; static DIGEST_REGEXP: RegExp; /** * * @param {string} fullName * @param {string} [givenTag] */ constructor(fullName: string, givenTag?: string); /** * @param {string[]} parts * @returns {string} */ joinTail(parts: string[]): string; /** * @param {string} part * @returns {boolean} */ isRegistry(part: string): boolean; /** * @param {string} [optionalRegistry] * @returns {string} */ getNameWithoutTag(optionalRegistry?: string): string; /** * @param {string} [optionalRegistry] * @returns {string} */ getFullName(optionalRegistry?: string): string; /** * @returns {string} */ getSimpleName(): string; /** * @param {string} optionalRepository * @returns {string} */ getNameWithOptionalRepository(optionalRepository: string): string; doValidate(): void; /** * @param {string} rest */ parseComponentsBeforeTag(rest: string): void; } export declare class ImageRef { static OCI_TYPE: string; static REPOSITORY_QUALIFIER: string; static TAG_QUALIFIER: string; static ARCH_QUALIFIER: string; static OS_QUALIFIER: string; static VARIANT_QUALIFIER: string; /** @type {Image} */ image: Image; /** @type {Platform} */ platform: Platform; /** * @param {string} image * @param {string} [platform] * @param {import("index.js").Options} [opts={}] */ constructor(image: string, platform?: string, opts?: import("index.js").Options); /** * @private */ private checkImageDigest; /** * @returns {PackageURL} * @throws {Error} * @see https://github.com/package-url/purl-spec/blob/master/PURL-TYPES.rst#oci */ getPackageURL(): PackageURL; }