synology_apm_repo.sdk.format.repo_transaction module¶
repo_transaction.<N> — magic rPTs, the parse_json_payload_header
shell repo_info.py also uses, except bytes [20,36) (the repo uuid there)
are always zero, followed by a small JSON payload (FORMAT-SPEC.md:
Multi-generation selection).
- class synology_apm_repo.sdk.format.repo_transaction.RepoTransaction(transaction_id, session_id, compact_id, raw)¶
Bases:
objectParsed
repo_transaction.<N>payload.session_id/compact_idare carried through for completeness/diagnostics (dump-style tooling); generation selection only ever needstransaction_id.
- synology_apm_repo.sdk.format.repo_transaction.parse_repo_transaction(data)¶
Parse a
repo_transaction.<N>file’s full bytes (header + JSON payload).- Raises:
DataCorruptError – A magic, header-CRC, or payload-CRC mismatch, a payload that is not a JSON object, or one whose
transaction_idis neither an integer nor a decimal string short enough to convert.FormatError –
datais shorter than the 64-byte header, or the payload is truncated relative to the length the header declares.