Expand description
S3-compatible storage client, status tracking, and asset types for typub.
This crate provides:
S3Storage— S3-compatible storage clientUploadResult— result of an asset uploadPendingAsset,PendingAssetList,DeferredAssets— deferred asset typesStatusTracker— SQLite-backed publish status tracking- Asset upload orchestration (
materialize_external_assets, etc.) - Pure utility functions for hash computation, URL construction, encoding, etc.
Extracted per [[RFC-0007:C-SHARED-TYPES]] to enable adapter subcrates to handle asset uploads without depending on the main crate.
Re-exports§
pub use status::AssetUploadRecord;pub use status::LifecycleAction;pub use status::PlatformStatus;pub use status::PostStatus;pub use status::PublishResult;pub use status::StatusDatabase;pub use status::StatusTracker;pub use status::determine_lifecycle_action;pub use status::validate_remote_status;
Modules§
- status
- Publish status tracking module.
Structs§
- Asset
Analysis - Result of asset analysis.
- Asset
Info - Information about a single asset in analysis.
- Deferred
Assets - Deferred asset context carried through pipeline stages.
- Pending
Asset - A pending asset reference for deferred upload. Per [[RFC-0004:C-PIPELINE-INTEGRATION]].
- Pending
Asset List - Result of building pending assets for deferred upload.
- S3Storage
- S3-compatible storage client Per [[RFC-0004:C-UPLOAD-TRACKING]]
- Upload
Result - Result of an asset upload
Enums§
- Asset
Strategy - Strategy for handling assets on each platform.
Functions§
- analyze_
assets - Analyze assets without materializing.
- base64_
encode - Simple base64 encoding
- build_
image_ marker_ url_ map - Build a URL map for image markers.
- build_
image_ src_ url_ map - Build a URL map for
<img src="...">references. - build_
pending_ asset_ list - Build a list of pending assets for deferred upload.
- build_
preview_ file_ url_ map - Build a map of asset paths to
file://URLs for local preview. - build_
resolved_ url_ map - Build a map from asset reference paths to resolved remote URLs.
- key_
candidates - Generate candidate keys for matching an image reference.
- materialize_
external_ assets - Materialize assets for External strategy (without caching).
- materialize_
external_ assets_ with_ status - Materialize assets for External strategy (with caching).
- materialize_
with_ analysis - Materialize assets with optional mock mode.
- mime_
type_ from_ path - Determine MIME type from file extension using mime_guess. Returns “application/octet-stream” for unknown types.
- replace_
asset_ placeholders - Replace placeholder tokens in content with remote URLs.
- resolve_
image_ reference_ url - Resolve an image reference to a URL using a map of path variants.
- to_
data_ uri - Encode binary data to base64 data URI
- upload_
pending_ assets - Upload all pending assets with caching support.