Class Const

java.lang.Object
land.oras.utils.Const

@NullMarked public final class Const extends Object
Constants used in the SDK.
  • Field Details

    • JSON_PROPERTY_MEDIA_TYPE

      public static final String JSON_PROPERTY_MEDIA_TYPE
      JSON property for media type
      See Also:
    • JSON_PROPERTY_ARTIFACT_TYPE

      public static final String JSON_PROPERTY_ARTIFACT_TYPE
      JSON property for artifact type
      See Also:
    • JSON_PROPERTY_SCHEMA_VERSION

      public static final String JSON_PROPERTY_SCHEMA_VERSION
      JSON property for schema version
      See Also:
    • JSON_PROPERTY_SUBJECT

      public static final String JSON_PROPERTY_SUBJECT
      JSON property for subject
      See Also:
    • JSON_PROPERTY_CONFIG

      public static final String JSON_PROPERTY_CONFIG
      JSON property for config
      See Also:
    • JSON_PROPERTY_LAYERS

      public static final String JSON_PROPERTY_LAYERS
      JSON property for layers
      See Also:
    • JSON_PROPERTY_DIGEST

      public static final String JSON_PROPERTY_DIGEST
      JSON property for digest
      See Also:
    • JSON_PROPERTY_SIZE

      public static final String JSON_PROPERTY_SIZE
      JSON property for size
      See Also:
    • JSON_PROPERTY_ANNOTATIONS

      public static final String JSON_PROPERTY_ANNOTATIONS
      JSON property for annotations
      See Also:
    • JSON_PROPERTY_PLATFORM

      public static final String JSON_PROPERTY_PLATFORM
      JSON property for platform
      See Also:
    • JSON_PROPERTY_MANIFESTS

      public static final String JSON_PROPERTY_MANIFESTS
      JSON property for manifests
      See Also:
    • JSON_PROPERTY_DATA

      public static final String JSON_PROPERTY_DATA
      JSON property for data (base64 encoded)
      See Also:
    • DEFAULT_REGISTRY

      public static final String DEFAULT_REGISTRY
      Default registry when no unqualified-search-registries is set in the config
      See Also:
    • DEFAULT_TAG

      public static final String DEFAULT_TAG
      Default tag
      See Also:
    • OCI_LAYOUT_INDEX

      public static final String OCI_LAYOUT_INDEX
      Index file in OCI layout
      See Also:
    • OCI_LAYOUT_FILE

      public static final String OCI_LAYOUT_FILE
      Layout folder in OCI layout
      See Also:
    • OCI_LAYOUT_BLOBS

      public static final String OCI_LAYOUT_BLOBS
      Blobs folder in OCI layout
      See Also:
    • DEFAULT_BLOB_DIR_MEDIA_TYPE

      public static final String DEFAULT_BLOB_DIR_MEDIA_TYPE
      The default blob directory media type
      See Also:
    • BLOB_DIR_ZSTD_MEDIA_TYPE

      public static final String BLOB_DIR_ZSTD_MEDIA_TYPE
      The blob directory media type for zstd compression
      See Also:
    • ZIP_MEDIA_TYPE

      public static final String ZIP_MEDIA_TYPE
      Zip media type
      See Also:
    • DEFAULT_ARTIFACT_MEDIA_TYPE

      public static final String DEFAULT_ARTIFACT_MEDIA_TYPE
      The default artifact media type if not specified
      See Also:
    • DEFAULT_BLOB_MEDIA_TYPE

      public static final String DEFAULT_BLOB_MEDIA_TYPE
      The default blob media type if file type cannot be determined
      See Also:
    • DEFAULT_DESCRIPTOR_MEDIA_TYPE

      public static final String DEFAULT_DESCRIPTOR_MEDIA_TYPE
      The default descriptor media type
      See Also:
    • DEFAULT_JSON_MEDIA_TYPE

      public static final String DEFAULT_JSON_MEDIA_TYPE
      The default JSON media type
      See Also:
    • DEFAULT_EMPTY_MEDIA_TYPE

      public static final String DEFAULT_EMPTY_MEDIA_TYPE
      The default empty media type
      See Also:
    • DEFAULT_INDEX_MEDIA_TYPE

      public static final String DEFAULT_INDEX_MEDIA_TYPE
      Default index media type
      See Also:
    • LEGACY_MANIFEST_MEDIA_TYPE

      public static final String LEGACY_MANIFEST_MEDIA_TYPE
      Legacy manifest media type for Docker distribution manifest v1, which is a JWS (JSON Web Signature) format and is not widely used anymore, but some registries may still support it for backward compatibility Ensure to raise a proper error message when we encounter this media type, as it is not supported by the SDK
      See Also:
    • ARTIFACT_MANIFEST_MEDIA_TYPE

      public static final String ARTIFACT_MANIFEST_MEDIA_TYPE
      The artifact manifest media type
      See Also:
    • DOCKER_MANIFEST_MEDIA_TYPE

      public static final String DOCKER_MANIFEST_MEDIA_TYPE
      Docker distribution manifest type
      See Also:
    • DOCKER_INDEX_MEDIA_TYPE

      public static final String DOCKER_INDEX_MEDIA_TYPE
      Docker index media type (manifest list or fat manifest)
      See Also:
    • DEFAULT_MANIFEST_MEDIA_TYPE

      public static final String DEFAULT_MANIFEST_MEDIA_TYPE
      The default manifest media type
      See Also:
    • CONFIG_RUNNING_CONTAINER_MEDIA_TYPE

      public static final String CONFIG_RUNNING_CONTAINER_MEDIA_TYPE
      Media type for config of running container
      See Also:
    • CONFIG_RUNNING_DOCKER_MEDIA_TYPE

      public static final String CONFIG_RUNNING_DOCKER_MEDIA_TYPE
      Media type for config of running docker
      See Also:
    • MANIFEST_ACCEPT_TYPE

      public static final String MANIFEST_ACCEPT_TYPE
      The default accept type for the manifest
    • ANNOTATION_TITLE

      public static final String ANNOTATION_TITLE
      Annotation for the title
      See Also:
    • ANNOTATION_DESCRIPTION

      public static final String ANNOTATION_DESCRIPTION
      Annotation for the description
      See Also:
    • ANNOTATION_CREATED

      public static final String ANNOTATION_CREATED
      Annotation for the crated date
      See Also:
    • ANNOTATION_REF

      public static final String ANNOTATION_REF
      Annotation for the ref name
      See Also:
    • ANNOTATION_SOURCE

      public static final String ANNOTATION_SOURCE
      Annotation for the source
      See Also:
    • ANNOTATION_REVISION

      public static final String ANNOTATION_REVISION
      Annotation for the revision
      See Also:
    • ANNOTATION_IMAGE_BASE_NAME

      public static final String ANNOTATION_IMAGE_BASE_NAME
      Annotation for the base image name
      See Also:
    • ANNOTATION_IMAGE_URL

      public static final String ANNOTATION_IMAGE_URL
      Annotation for the image URL
      See Also:
    • ANNOTATION_IMAGE_VERSION

      public static final String ANNOTATION_IMAGE_VERSION
      Annotation for the image version
      See Also:
    • PLATFORM_OS

      public static final String PLATFORM_OS
      The platform OS key
      See Also:
    • PLATFORM_ARCHITECTURE

      public static final String PLATFORM_ARCHITECTURE
      The platform architecture key
      See Also:
    • PLATFORM_VARIANT

      public static final String PLATFORM_VARIANT
      The platform variant key, which can be used in the annotation "variant" to specify the variant of the architecture, such as armv7 or armv8
      See Also:
    • PLATFORM_OS_VERSION

      public static final String PLATFORM_OS_VERSION
      The platform OS version key, which can be used in the annotation "os.version" to specify the version of the OS, such as ubuntu 20.04 or alpine 3.14
      See Also:
    • PLATFORM_OS_FEATURES

      public static final String PLATFORM_OS_FEATURES
      The platform OS features key, which can be used in the annotation "os.features" to specify the features of the OS, such as sse4 or aes
      See Also:
    • PLATFORM_FEATURES

      public static final String PLATFORM_FEATURES
      The platform features key, which can be used in the annotation "features" to specify the features of the platform, such as gpu or fpga
      See Also:
    • PLATFORM_UNKNOWN

      public static final String PLATFORM_UNKNOWN
      The default value for unknown platform information
      See Also:
    • PLATFORM_LINUX

      public static final String PLATFORM_LINUX
      The platform value for linux os
      See Also:
    • PLATFORM_WINDOWS

      public static final String PLATFORM_WINDOWS
      The platform value for windows OS
      See Also:
    • PLATFORM_ARCHITECTURE_AMD64

      public static final String PLATFORM_ARCHITECTURE_AMD64
      The platform value for amd64 architecture
      See Also:
    • PLATFORM_ARCHITECTURE_386

      public static final String PLATFORM_ARCHITECTURE_386
      The platform value for 386 architecture
      See Also:
    • PLATFORM_ARCHITECTURE_ARM

      public static final String PLATFORM_ARCHITECTURE_ARM
      The platform value for arm architecture
      See Also:
    • PLATFORM_ARCHITECTURE_ARM64

      public static final String PLATFORM_ARCHITECTURE_ARM64
      The platform value for arm64 architecture
      See Also:
    • PLATFORM_ARCHITECTURE_PPC64LE

      public static final String PLATFORM_ARCHITECTURE_PPC64LE
      The platform value for ppc64le architecture
      See Also:
    • PLATFORM_ARCHITECTURE_RISCV64

      public static final String PLATFORM_ARCHITECTURE_RISCV64
      The platform value for riscv64 architecture
      See Also:
    • PLATFORM_ARCHITECTURE_S390X

      public static final String PLATFORM_ARCHITECTURE_S390X
      The platform value for s390x architecture
      See Also:
    • VARIANT_V5

      public static final String VARIANT_V5
      The v5 variant for arm architecture, which can be used in the annotation "variant" to specify the variant of the arm architecture
      See Also:
    • VARIANT_V6

      public static final String VARIANT_V6
      The v6 variant for arm architecture, which can be used in the annotation "variant" to specify the variant of the arm architecture
      See Also:
    • VARIANT_V7

      public static final String VARIANT_V7
      The v7 variant for arm architecture, which can be used in the annotation "variant" to specify the variant of the arm architecture
      See Also:
    • VARIANT_V8

      public static final String VARIANT_V8
      The v8 variant for arm architecture, which can be used in the annotation "variant" to specify the variant of the arm architecture
      See Also:
    • ANNOTATION_ORAS_CONTENT_DIGEST

      public static final String ANNOTATION_ORAS_CONTENT_DIGEST
      Annotation of the uncompressed dir content
      See Also:
    • ANNOTATION_ORAS_UNPACK

      public static final String ANNOTATION_ORAS_UNPACK
      Annotation to unpack the content
      See Also:
    • AUTHORIZATION_HEADER

      public static final String AUTHORIZATION_HEADER
      Authorization header
      See Also:
    • USER_AGENT_HEADER

      public static final String USER_AGENT_HEADER
      User agent header
      See Also:
    • CONTENT_TYPE_HEADER

      public static final String CONTENT_TYPE_HEADER
      Content type header
      See Also:
    • CONTENT_LENGTH_HEADER

      public static final String CONTENT_LENGTH_HEADER
      Content length header
      See Also:
    • DOCKER_CONTENT_DIGEST_HEADER

      public static final String DOCKER_CONTENT_DIGEST_HEADER
      The Docker content digest header
      See Also:
    • OCI_SUBJECT_HEADER

      public static final String OCI_SUBJECT_HEADER
      OCI subject header
      See Also:
    • ACCEPT_HEADER

      public static final String ACCEPT_HEADER
      Accept header
      See Also:
    • LOCATION_HEADER

      public static final String LOCATION_HEADER
      Location header
      See Also:
    • WWW_AUTHENTICATE_HEADER

      public static final String WWW_AUTHENTICATE_HEADER
      WWW-Authenticate header
      See Also:
    • APPLICATION_OCTET_STREAM_HEADER_VALUE

      public static final String APPLICATION_OCTET_STREAM_HEADER_VALUE
      Application octet stream header value
      See Also:
    • CONTENT_RANGE_HEADER

      public static final String CONTENT_RANGE_HEADER
      Content Range header
      See Also:
    • RANGE_HEADER

      public static final String RANGE_HEADER
      Range header
      See Also:
    • OCI_CHUNK_MIN_LENGTH_HEADER

      public static final String OCI_CHUNK_MIN_LENGTH_HEADER
      OCI Chunk Minimum Length header
      See Also:
    • METRIC_TOKEN_REFRESH

      public static final String METRIC_TOKEN_REFRESH
      Metric name for token refresh counter
      See Also:
    • METRIC_HTTP_REQUESTS

      public static final String METRIC_HTTP_REQUESTS
      Metric name for HTTP request
      See Also:
    • METRIC_HTTP_RETRIES

      public static final String METRIC_HTTP_RETRIES
      Metric name for HTTP retries
      See Also:
    • METRIC_TAG_SERVICE

      public static final String METRIC_TAG_SERVICE
      Metric name for token refresh duration
      See Also:
    • METRIC_TAG_REALM

      public static final String METRIC_TAG_REALM
      Metric name for token refresh duration
      See Also:
    • FLUX_CD_CONFIG_MEDIA_TYPE

      public static final String FLUX_CD_CONFIG_MEDIA_TYPE
      Flux CD config media type
      See Also:
    • FLUX_CD_CONTENT_MEDIA_TYPE

      public static final String FLUX_CD_CONTENT_MEDIA_TYPE
      Flux CD content media type
      See Also:
    • HELM_CONFIG_MEDIA_TYPE

      public static final String HELM_CONFIG_MEDIA_TYPE
      Helm config media type
      See Also:
    • HELM_CONTENT_MEDIA_TYPE

      public static final String HELM_CONTENT_MEDIA_TYPE
      Helm content media type
      See Also:
    • SIGSTORE_BUNDLE_MEDIA_TYPE

      public static final String SIGSTORE_BUNDLE_MEDIA_TYPE
      Sigstore bundle media type, used both as the referrer artifactType and as the layer media type of an attached Sigstore signature (the format produced by recent cosign sign with the new bundle format).
      See Also:
    • IN_TOTO_PAYLOAD_TYPE

      public static final String IN_TOTO_PAYLOAD_TYPE
      The payload type used inside a Sigstore DSSE envelope: an in-toto statement.
      See Also:
    • ANNOTATION_SIGSTORE_BUNDLE_CONTENT

      public static final String ANNOTATION_SIGSTORE_BUNDLE_CONTENT
      Annotation describing the content of a Sigstore bundle (e.g. dsse-envelope).
      See Also:
    • SIGSTORE_BUNDLE_CONTENT_DSSE

      public static final String SIGSTORE_BUNDLE_CONTENT_DSSE
      Annotation value for ANNOTATION_SIGSTORE_BUNDLE_CONTENT indicating the bundle wraps a DSSE envelope.
      See Also:
    • ANNOTATION_SIGSTORE_BUNDLE_PREDICATE_TYPE

      public static final String ANNOTATION_SIGSTORE_BUNDLE_PREDICATE_TYPE
      Annotation describing the predicate type of a Sigstore bundle (e.g. https://sigstore.dev/cosign/sign/v1).
      See Also:
    • KEY_EC_ALGORITHM

      public static final String KEY_EC_ALGORITHM
      The only supported key algorithm for now
      See Also:
    • KEY_SHA256_ECDSA_SIGNATURE_ALGORITHM

      public static final String KEY_SHA256_ECDSA_SIGNATURE_ALGORITHM
      The full signature algorithm
      See Also:
  • Method Details

    • currentTimestamp

      public static String currentTimestamp()
      Get the current timestamp for the created annotation
      Returns:
      The current timestamp