synology_apm_repo.sdk.identifiers module¶
Distinct identifier spaces that look identical on the wire (all int or
all str) but must never be mixed.
Each is a typing.NewType: plain int/str at runtime, but swapping
two same-shaped identifiers is a mypy error.
- class synology_apm_repo.sdk.identifiers.StreamId¶
ChunkAddress/ composition-path stream id (0-255,uint8).alias of
int
- class synology_apm_repo.sdk.identifiers.SessionId¶
Composition-path session id — one per backup version within a stream.
alias of
int
- class synology_apm_repo.sdk.identifiers.CompOffset¶
db/file_map.comp_offset— the global offset of aRecordHeadwithin a(StreamId, SessionId)composition.alias of
int
- class synology_apm_repo.sdk.identifiers.BucketId¶
Pool bucket id (0..2**40-1) — part of
ChunkAddress.alias of
int
- class synology_apm_repo.sdk.identifiers.ChunkIdx¶
Index of a 4 KiB chunk within a bucket (0..8191) — part of
ChunkAddress.alias of
int
- class synology_apm_repo.sdk.identifiers.ConnectionId¶
db/connection_config.connection_id— 12-char id identifying a Copy / Tiering connection. NOT the same space asConnectionConfigId.alias of
str
- class synology_apm_repo.sdk.identifiers.ConnectionConfigId¶
db/connection_config.connection_config_id— the local autoincrement primary key for a connection and version_type pair.alias of
int
- class synology_apm_repo.sdk.identifiers.CatalogId¶
Repository Layer identifier for one
api.Catalog; not an on-disk column. A vault’sconnection_configtable is unique within that vault, but each object-storage sibling’s own table restarts at 1, so a bareconnection_config_idcan’t tell siblings apart. For a vault this isstr(connection.connection_config_id); for object storage, the repo-id string (a directory name, unique per bucket).alias of
str
- synology_apm_repo.sdk.identifiers.resolve_catalog_id(repo_id, connection_config_id)¶
The
CatalogIdformula shared byapi.catalog.Catalog.catalog_idandunits.node_ref.canonical_ref_for:repo_idwhen set (object storage), elsestr(connection_config_id)(a vault).
- class synology_apm_repo.sdk.identifiers.WorkloadId¶
db/workload_config.workload_id— local autoincrement primary key.alias of
int
- class synology_apm_repo.sdk.identifiers.WorkloadUid¶
db/workload_config.workload_uid—"<uuid>;<serial>"composite.alias of
str
- class synology_apm_repo.sdk.identifiers.VersionId¶
db/copy_target_version.version_id— local autoincrement primary key.alias of
int
- class synology_apm_repo.sdk.identifiers.SaasVersionId¶
copy_target_version.saas_version_id/saas_version.version_info.version_id— a SaaS stream’s own, per-stream version numbering (resolved via(snapshot_id, SaasVersionId) -> stream_version,units/saas/stream.py). NOT the same space asVersionIdabove — both areint, andcatalog.Versioncarries one of each.alias of
int
- class synology_apm_repo.sdk.identifiers.VersionUid¶
db/copy_target_version.version_uid— the Copy-version UUID minted server-side; formscopy_meta_file/<Type>_<VersionUid>. NOT the same space astarget.db’s on-prem-mintedversion_table.version_uuid.alias of
str
- class synology_apm_repo.sdk.identifiers.SnapshotUuid¶
saas_snapshot.snapshot_info.snapshot_uuid— server-minted snapshot id.alias of
str