27 lines
558 B
Python
27 lines
558 B
Python
|
|
"""
|
||
|
|
Data models for the proxy file system.
|
||
|
|
"""
|
||
|
|
|
||
|
|
from dataclasses import dataclass
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass
|
||
|
|
class ProxyMetadata:
|
||
|
|
"""Metadata stored in a proxy file's YAML frontmatter."""
|
||
|
|
|
||
|
|
source_path: str
|
||
|
|
source_checksum: str # "sha256:<hex>"
|
||
|
|
source_size: int
|
||
|
|
generated_at: str # ISO 8601
|
||
|
|
extractor: str
|
||
|
|
extractor_version: str
|
||
|
|
|
||
|
|
|
||
|
|
@dataclass
|
||
|
|
class ExtractionResult:
|
||
|
|
"""Result returned by an extractor after processing a source file."""
|
||
|
|
|
||
|
|
content: str
|
||
|
|
extractor: str
|
||
|
|
extractor_version: str
|