pub struct RegistryApi { /* private fields */ }Expand description
Spec registry — publish, search, yank, share spec artifacts
Implementations§
Source§impl RegistryApi
impl RegistryApi
Sourcepub async fn feature_registry_spec(
&self,
scope: &str,
name: &str,
) -> Result<RegistrySpecFeatureState>
pub async fn feature_registry_spec( &self, scope: &str, name: &str, ) -> Result<RegistrySpecFeatureState>
Add a SPEC to the featured set (super-admin)
The SPEC’s existence is confirmed BEFORE the featured set is touched, so a typo cannot leave a dangling id in a shared list — that is what the 404 protects. The set itself is mutated under a compare-and-set retry, because it is one shared record and a plain read-modify-write was last-writer-wins.
Idempotent: featuring an already-featured SPEC is 200, not a conflict.
POST /api/v1/registry/admin/specs/{scope}/{name}/feature
Sourcepub async fn registry_admin_list_specs(
&self,
params: &RegistryAdminListSpecsParams,
) -> Result<RegistryAdminListSpecsResponse>
pub async fn registry_admin_list_specs( &self, params: &RegistryAdminListSpecsParams, ) -> Result<RegistryAdminListSpecsResponse>
Admin: list all specs (regardless of visibility)
GET /api/v1/registry/admin/specs
Sourcepub async fn registry_get_artifact(
&self,
scope: &str,
name: &str,
version: &str,
) -> Result<Bytes>
pub async fn registry_get_artifact( &self, scope: &str, name: &str, version: &str, ) -> Result<Bytes>
Download tarball/artifact bundle for a spec version
GET /api/v1/registry/spec/{scope}/{name}/{version}/artifact
Sourcepub async fn registry_get_file(
&self,
scope: &str,
name: &str,
version: &str,
params: &RegistryGetFileParams,
) -> Result<RegistryGetFileResponse>
pub async fn registry_get_file( &self, scope: &str, name: &str, version: &str, params: &RegistryGetFileParams, ) -> Result<RegistryGetFileResponse>
Get a single file from inside a spec version artifact
GET /api/v1/registry/spec/{scope}/{name}/{version}/file
Sourcepub async fn registry_get_readme(
&self,
scope: &str,
name: &str,
version: &str,
) -> Result<RegistryGetReadmeResponse>
pub async fn registry_get_readme( &self, scope: &str, name: &str, version: &str, ) -> Result<RegistryGetReadmeResponse>
Get README for a spec version
GET /api/v1/registry/spec/{scope}/{name}/{version}/readme
Get share/visibility settings for a spec
GET /api/v1/registry/spec/{scope}/{name}/share
Sourcepub async fn registry_get_sparse_index(
&self,
shard: &str,
scope: &str,
name: &str,
) -> Result<RegistryGetSparseIndexResponse>
pub async fn registry_get_sparse_index( &self, shard: &str, scope: &str, name: &str, ) -> Result<RegistryGetSparseIndexResponse>
Get sparse-index entry for a spec
GET /api/v1/registry/index/{shard}/{scope}/{name}
Sourcepub async fn registry_get_spec_metadata(
&self,
scope: &str,
name: &str,
) -> Result<RegistryGetSpecMetadataResponse>
pub async fn registry_get_spec_metadata( &self, scope: &str, name: &str, ) -> Result<RegistryGetSpecMetadataResponse>
Get spec metadata (latest version pointers, owners)
GET /api/v1/registry/spec/{scope}/{name}
Sourcepub async fn registry_get_spec_version(
&self,
scope: &str,
name: &str,
version: &str,
) -> Result<RegistryGetSpecVersionResponse>
pub async fn registry_get_spec_version( &self, scope: &str, name: &str, version: &str, ) -> Result<RegistryGetSpecVersionResponse>
Get a specific version of a spec
Returns the full PublishedSpec record plus a download_url pointing at the artifact
endpoint.
GET /api/v1/registry/spec/{scope}/{name}/{version}
Sourcepub async fn registry_list_files(
&self,
scope: &str,
name: &str,
version: &str,
) -> Result<RegistryListFilesResponse>
pub async fn registry_list_files( &self, scope: &str, name: &str, version: &str, ) -> Result<RegistryListFilesResponse>
List files inside a spec version artifact
GET /api/v1/registry/spec/{scope}/{name}/{version}/files
Sourcepub async fn registry_publish(
&self,
body: &RegistryPublishRequest,
) -> Result<RegistryPublishResponse>
pub async fn registry_publish( &self, body: &RegistryPublishRequest, ) -> Result<RegistryPublishResponse>
Publish a new spec version to the registry
Multipart upload of a tarball + manifest. Server validates manifest, verifies optional
sha256, and persists the artifact. Returns the full PublishedSpec record. Location header
points at the version’s metadata endpoint.
POST /api/v1/registry/publish
Sourcepub async fn registry_search(
&self,
params: &RegistrySearchParams,
) -> Result<RegistrySearchResponse>
pub async fn registry_search( &self, params: &RegistrySearchParams, ) -> Result<RegistrySearchResponse>
Search the registry for specs
GET /api/v1/registry/search
Set share/visibility settings for a spec
POST /api/v1/registry/spec/{scope}/{name}/share
Sourcepub async fn registry_unyank_version(
&self,
scope: &str,
name: &str,
version: &str,
) -> Result<RegistryUnyankVersionResponse>
pub async fn registry_unyank_version( &self, scope: &str, name: &str, version: &str, ) -> Result<RegistryUnyankVersionResponse>
Reverse a yank on a published spec version
POST /api/v1/registry/spec/{scope}/{name}/{version}/unyank
Sourcepub async fn registry_yank_version(
&self,
scope: &str,
name: &str,
version: &str,
body: &RegistryYankVersionRequest,
) -> Result<RegistryYankVersionResponse>
pub async fn registry_yank_version( &self, scope: &str, name: &str, version: &str, body: &RegistryYankVersionRequest, ) -> Result<RegistryYankVersionResponse>
Yank (mark unsafe) a published spec version
POST /api/v1/registry/spec/{scope}/{name}/{version}/yank
Sourcepub async fn seed_starter_specs(&self) -> Result<SeedStarterSpecsResponse>
pub async fn seed_starter_specs(&self) -> Result<SeedStarterSpecsResponse>
Bulk-publish the bundled starter SPECs (super-admin)
Idempotent: a starter SPEC already present is counted in skipped, not republished, so
re-running is safe and is how a partially-failed seed is completed.
errors is present ONLY when at least one SPEC failed. Its absence means no failures — not
that the field is unavailable — so a client should treat missing as empty rather than
unknown. A run can be partially successful: added and errors are both meaningful in the
same response, and the status is still 200.
POST /api/v1/registry/admin/specs/seed
Sourcepub async fn set_registry_spec_visibility(
&self,
scope: &str,
name: &str,
body: &SetRegistrySpecVisibilityRequest,
) -> Result<SetRegistrySpecVisibilityResponse>
pub async fn set_registry_spec_visibility( &self, scope: &str, name: &str, body: &SetRegistrySpecVisibilityRequest, ) -> Result<SetRegistrySpecVisibilityResponse>
Make a SPEC public or private (super-admin)
PATCH and only PATCH — a PUT is 405 with the allowed methods named.
WRITE SEMANTICS: replaces the visibility, which is the only field this route touches.
visibility is required and must be exactly public or private; anything else, including
a missing body or a near-miss like unlisted, is 400 rather than being coerced or ignored.
PATCH /api/v1/registry/admin/specs/{scope}/{name}/visibility
Sourcepub async fn unfeature_registry_spec(
&self,
scope: &str,
name: &str,
) -> Result<RegistrySpecFeatureState>
pub async fn unfeature_registry_spec( &self, scope: &str, name: &str, ) -> Result<RegistrySpecFeatureState>
Remove a SPEC from the featured set (super-admin)
Same shape and same guards as the POST; the response’s featured is simply false.
Idempotent — un-featuring something that was not featured is 200.
DELETE /api/v1/registry/admin/specs/{scope}/{name}/feature
Trait Implementations§
Source§impl Clone for RegistryApi
impl Clone for RegistryApi
Source§fn clone(&self) -> RegistryApi
fn clone(&self) -> RegistryApi
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more