Documentation
¶
Overview ¶
Package layout defines media object keys, dependency-free so the access worker can classify paths without importing the media runtime:
{tenant}/{kind}/{content_id}/manifest.json | manifests/{version}.json
/originals/{sha256-hex | u-uuid | slot | i-uuid}
/blobs/{sha256-hex | u-uuid}
/public/{name}.webp
Index ¶
Constants ¶
View Source
const ( AreaManifest = "manifest" // manifest.json and manifests/{version}.json AreaOriginals = "originals" AreaBlobs = "blobs" AreaPublic = "public" )
Folder areas.
View Source
const ( SHA256Prefix = "sha256-" UploadPrefix = "u-" InlinePrefix = "i-" PublicExt = ".webp" )
Variables ¶
This section is empty.
Functions ¶
func ParseSHA256Name ¶
ParseSHA256Name returns the digest of a "sha256-{hex}" name.
func ValidBlobName ¶
ValidBlobName accepts "sha256-{64 lowercase hex}" and "u-{uuid}".
func ValidInlineName ¶ added in v0.17.0
ValidInlineName accepts "i-{uuid}", an inline image's id.
func ValidSegment ¶
ValidSegment keeps keys stable ASCII: [A-Za-z0-9._-]{1,128}, no leading dot.
Types ¶
Click to show internal directories.
Click to hide internal directories.