mirror of
https://github.com/hauler-dev/hauler.git
synced 2026-08-19 04:16:27 +00:00
119 lines
5.0 KiB
Go
119 lines
5.0 KiB
Go
package consts
|
|
|
|
import "fmt"
|
|
|
|
const (
|
|
// container media types
|
|
OCIManifestSchema1 = "application/vnd.oci.image.manifest.v1+json"
|
|
DockerManifestSchema2 = "application/vnd.docker.distribution.manifest.v2+json"
|
|
DockerManifestListSchema2 = "application/vnd.docker.distribution.manifest.list.v2+json"
|
|
OCIImageIndexSchema = "application/vnd.oci.image.index.v1+json"
|
|
DockerConfigJSON = "application/vnd.docker.container.image.v1+json"
|
|
DockerLayer = "application/vnd.docker.image.rootfs.diff.tar.gzip"
|
|
DockerForeignLayer = "application/vnd.docker.image.rootfs.foreign.diff.tar.gzip"
|
|
DockerUncompressedLayer = "application/vnd.docker.image.rootfs.diff.tar"
|
|
OCILayer = "application/vnd.oci.image.layer.v1.tar+gzip"
|
|
OCIArtifact = "application/vnd.oci.empty.v1+json"
|
|
|
|
// helm chart media types
|
|
ChartConfigMediaType = "application/vnd.cncf.helm.config.v1+json"
|
|
ChartLayerMediaType = "application/vnd.cncf.helm.chart.content.v1.tar+gzip"
|
|
ProvLayerMediaType = "application/vnd.cncf.helm.chart.provenance.v1.prov"
|
|
|
|
// file media types
|
|
FileLayerMediaType = "application/vnd.content.hauler.file.layer.v1"
|
|
FileLocalConfigMediaType = "application/vnd.content.hauler.file.local.config.v1+json"
|
|
FileDirectoryConfigMediaType = "application/vnd.content.hauler.file.directory.config.v1+json"
|
|
FileHttpConfigMediaType = "application/vnd.content.hauler.file.http.config.v1+json"
|
|
|
|
// memory media types
|
|
MemoryConfigMediaType = "application/vnd.content.hauler.memory.config.v1+json"
|
|
|
|
// wasm media types
|
|
WasmArtifactLayerMediaType = "application/vnd.wasm.content.layer.v1+wasm"
|
|
WasmConfigMediaType = "application/vnd.wasm.config.v1+json"
|
|
|
|
// unknown media types
|
|
UnknownManifest = "application/vnd.hauler.cattle.io.unknown.v1+json"
|
|
UnknownLayer = "application/vnd.content.hauler.unknown.layer"
|
|
Unknown = "unknown"
|
|
|
|
// vendor prefixes
|
|
OCIVendorPrefix = "vnd.oci"
|
|
DockerVendorPrefix = "vnd.docker"
|
|
HaulerVendorPrefix = "vnd.hauler"
|
|
|
|
// annotation keys
|
|
ContainerdImageNameKey = "io.containerd.image.name"
|
|
KindAnnotationName = "kind"
|
|
KindAnnotationImage = "dev.hauler/image"
|
|
KindAnnotationIndex = "dev.hauler/imageIndex"
|
|
KindAnnotationSigs = "dev.hauler/sigs"
|
|
KindAnnotationAtts = "dev.hauler/atts"
|
|
KindAnnotationSboms = "dev.hauler/sboms"
|
|
// KindAnnotationReferrers is the kind prefix for OCI 1.1 referrer manifests (cosign v3
|
|
// new-bundle-format). Each referrer gets a unique kind with the referrer manifest digest
|
|
// appended (e.g. "dev.hauler/referrers/sha256hex") so multiple referrers for the same
|
|
// base image coexist in the OCI index.
|
|
KindAnnotationReferrers = "dev.hauler/referrers"
|
|
|
|
// Sigstore / OCI 1.1 artifact media types used by cosign v3 new-bundle-format.
|
|
SigstoreBundleMediaType = "application/vnd.dev.sigstore.bundle.v0.3+json"
|
|
OCIEmptyConfigMediaType = "application/vnd.oci.empty.v1+json"
|
|
|
|
ImageAnnotationKey = "hauler.dev/key"
|
|
ImageAnnotationPlatform = "hauler.dev/platform"
|
|
ImageAnnotationRegistry = "hauler.dev/registry"
|
|
ImageAnnotationTlog = "hauler.dev/use-tlog-verify"
|
|
ImageAnnotationRewrite = "hauler.dev/rewrite"
|
|
ImageAnnotationExcludeExtras = "hauler.dev/exclude-extras"
|
|
ImageRefKey = "org.opencontainers.image.ref.name"
|
|
|
|
// cosign keyless validation options
|
|
ImageAnnotationCertIdentity = "hauler.dev/certificate-identity"
|
|
ImageAnnotationCertIdentityRegexp = "hauler.dev/certificate-identity-regexp"
|
|
ImageAnnotationCertOidcIssuer = "hauler.dev/certificate-oidc-issuer"
|
|
ImageAnnotationCertOidcIssuerRegexp = "hauler.dev/certificate-oidc-issuer-regexp"
|
|
ImageAnnotationCertGithubWorkflowRepository = "hauler.dev/certificate-github-workflow-repository"
|
|
|
|
// content kinds
|
|
ImagesContentKind = "Images"
|
|
ChartsContentKind = "Charts"
|
|
FilesContentKind = "Files"
|
|
// DriverContentKind = "Driver"
|
|
|
|
// content groups
|
|
ContentGroup = "content.hauler.cattle.io"
|
|
CollectionGroup = "collection.hauler.cattle.io"
|
|
|
|
// environment variables
|
|
HaulerDir = "HAULER_DIR"
|
|
HaulerTempDir = "HAULER_TEMP_DIR"
|
|
HaulerStoreDir = "HAULER_STORE_DIR"
|
|
HaulerIgnoreErrors = "HAULER_IGNORE_ERRORS"
|
|
|
|
// container files and directories
|
|
ImageManifestFile = "manifest.json"
|
|
ImageConfigFile = "config.json"
|
|
|
|
// other constraints
|
|
CarbideRegistry = "rgcrprod.azurecr.us"
|
|
DefaultNamespace = "hauler"
|
|
DefaultTag = "latest"
|
|
DefaultStoreName = "store"
|
|
DefaultHaulerDirName = ".hauler"
|
|
DefaultHaulerTempDirName = "hauler"
|
|
DefaultRegistryRootDir = "registry"
|
|
DefaultRegistryPort = 5000
|
|
DefaultFileserverRootDir = "fileserver"
|
|
DefaultFileserverPort = 8080
|
|
DefaultFileserverTimeout = 60
|
|
DefaultHaulerArchiveName = "haul.tar.zst"
|
|
DefaultHaulerManifestName = "hauler-manifest.yaml"
|
|
DefaultRetries = 3
|
|
RetriesInterval = 5
|
|
CustomTimeFormat = "2006-01-02 15:04:05"
|
|
)
|
|
|
|
var FileExcludePattern = fmt.Sprintf(`^%s/[.\-_]`, DefaultNamespace)
|