Module id

Module id 

Source
Expand description

Definitions for object identifiers, including usecases and scopes.

This module contains types to define and manage object identifiers:

  • ObjectId is the main identifier type for objects, consisting of a usecase, scopes, and a key. Every object stored in the object store has a unique ObjectId.
  • Scope and Scopes define hierarchical scopes for objects, which are part of the ObjectId.

§Usecases

A usecase (sometimes called a “product”) is a top-level namespace like "attachments" or "debug-files". It groups related objects and can have usecase-specific server configuration (rate limits, killswitches, etc.).

§Scopes

Scopes are ordered key-value pairs that form a hierarchy within a usecase — for example, organization=17, project=42. They serve as both an organizational structure and an authorization boundary. See the objectstore-types docs for details on scope validation and formatting.

§Storage paths

An ObjectId is converted to a storage path for backends via ObjectId::as_storage_path:

{usecase}/{scope1_key}.{scope1_value}/{scope2_key}.{scope2_value}/objects/{key}

For example: attachments/org.17/project.42/objects/abc123

Structs§

AsStoragePath
A view returned by ObjectId::as_storage_path.
ObjectContext
Defines where an object, or batch of objects, belongs within the object store.
ObjectId
The fully qualified identifier of an object.

Type Aliases§

ObjectKey
A key that uniquely identifies an object within its usecase and scopes.