Expand description
Definitions for object identifiers, including usecases and scopes.
This module contains types to define and manage object identifiers:
ObjectIdis the main identifier type for objects, consisting of a usecase, scopes, and a key. Every object stored in the object store has a uniqueObjectId.ScopeandScopesdefine hierarchical scopes for objects, which are part of theObjectId.
§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§
- AsStorage
Path - A view returned by
ObjectId::as_storage_path. - Object
Context - Defines where an object, or batch of objects, belongs within the object store.
- Object
Id - The fully qualified identifier of an object.
Type Aliases§
- Object
Key - A key that uniquely identifies an object within its usecase and scopes.