Skip to main content

Crate argone_marketplace_core

Crate argone_marketplace_core 

Source
Expand description

The Argone marketplace server: gRPC Registry over a Postgres metadata store and a blob seam. Reuses signing (crypto), manifest (capabilities + identity validation), and marketplace-proto (wire types). A complete, self-hostable marketplace — the reference edition.

Modules§

blob
The blob-storage seam: content-addressed artifact bytes. FsBlobStore is the self-hoster default; InMemoryBlobStore backs logic tests. The S3/MinIO impl lives in store::object.
db
Postgres-backed MetadataRepository (sqlx, runtime-checked queries). All tables live in the marketplace schema. Behavior mirrors InMemoryRepo exactly so the same assertions hold.
domain
Plain domain structs for the metadata model. No ORM — sqlx rows map onto these in db.
error
The core domain error and its gRPC status mapping (mapping lives in service).
identity
Identity + root-key seams. M2 ships a read-only PAT resolver and a dev root-key reader; M3 grows IdentityResolver into full publisher/handle/key/PAT management.
manage
Backend-agnostic write-side management: publisher/handle/key/PAT operations shared by the reference CLI and (later) the cloud dashboard. Persistence is delegated to a ManagementStore implementation (see pg for the Postgres store); only the gate differs between editions.
policy
The publish-policy seam: a hook that runs after all crypto/trust-chain validation and before the artifact is stored, gating a publish for policy reasons (quota, moderation, scan) orthogonal to cryptographic validity. The reference impl imposes no restriction.
publish
The Publish pipeline: validate → digest → parse → key-select → verify stored chain → ownership → store blob → persist. Pure logic over the seams; reuses signing/manifest for crypto.
ranking
The ranking seam: decides the order of search results. The reference impl orders by package name, matching the repository’s ORDER BY name; cloud injects featured/curated ranking.
read
Read-path logic: search / get_package / download / poll_updates. All public (no PAT). Mirrors the reference read handlers exactly (download_count = SUM for summaries; current_version drives a version-less download; poll critical = ANY gap version above the installed one is critical).
repo
MetadataRepository trait and in-memory implementation for marketplace metadata.
service
tonic Registry service: thin wire adapter over the pure logic layer (publish + read). Holds the four seams behind Arcs; every RPC delegates and maps CoreError → tonic::Status.
store
Concrete blob backends built on object_store (LocalFileSystem + AmazonS3/MinIO).
telemetry
The telemetry seam: fire-and-forget observability of registry events. The persisted download count stays in the core data model (see read::download); this hook is additive. The reference impl does nothing; cloud forwards events to an analytics pipeline.