pub struct PluginStorage { /* private fields */ }Implementations§
Source§impl PluginStorage
impl PluginStorage
pub async fn new(config: &Config) -> Result<Self>
pub async fn upload_plugin( &self, plugin_name: &str, version: &str, data: Vec<u8>, ) -> Result<String>
pub async fn upload_template( &self, template_name: &str, version: &str, data: Vec<u8>, ) -> Result<String>
pub async fn upload_scenario( &self, scenario_name: &str, version: &str, data: Vec<u8>, ) -> Result<String>
Sourcepub fn plugin_object_key(plugin_name: &str, version: &str) -> Result<String>
pub fn plugin_object_key(plugin_name: &str, version: &str) -> Result<String>
Resolve the storage key for a plugin version using the same
sanitization rules as upload_plugin. Public so background workers can
fetch artifacts for scanning without duplicating the scheme.
pub async fn download_plugin(&self, key: &str) -> Result<Vec<u8>>
pub async fn delete_plugin(&self, key: &str) -> Result<()>
Sourcepub async fn upload_spec(
&self,
org_id: &str,
spec_name: &str,
data: Vec<u8>,
) -> Result<String>
pub async fn upload_spec( &self, org_id: &str, spec_name: &str, data: Vec<u8>, ) -> Result<String>
Upload an OpenAPI spec file for a hosted mock deployment
Sourcepub async fn health_check(&self) -> Result<()>
pub async fn health_check(&self) -> Result<()>
Health check - verify storage connectivity
Sourcepub async fn upload_snapshot_blob(
&self,
workspace_id: Uuid,
snapshot_id: Uuid,
data: Vec<u8>,
) -> Result<String>
pub async fn upload_snapshot_blob( &self, workspace_id: Uuid, snapshot_id: Uuid, data: Vec<u8>, ) -> Result<String>
Upload a workspace snapshot manifest blob (#10). Snapshots
inline their manifest in snapshots.manifest for small
workspaces; for larger ones the registry serializes the JSON
once + uploads here, then stores the returned URL in
snapshots.storage_url.
Key format: snapshots/{workspace_id}/{snapshot_id}.json —
keyed by workspace so a stray scan stays within tenant
boundaries (the snapshots row is workspace-scoped on the DB
side too, no org_id column).
Trait Implementations§
Source§impl Clone for PluginStorage
impl Clone for PluginStorage
Source§fn clone(&self) -> PluginStorage
fn clone(&self) -> PluginStorage
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for PluginStorage
impl !RefUnwindSafe for PluginStorage
impl Send for PluginStorage
impl Sync for PluginStorage
impl Unpin for PluginStorage
impl UnsafeUnpin for PluginStorage
impl !UnwindSafe for PluginStorage
Blanket Implementations§
Source§impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedExplicit<'a, E> for Twhere
T: 'a,
Source§impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
impl<'a, T, E> AsTaggedImplicit<'a, E> for Twhere
T: 'a,
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
Converts
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreCreates a shared type from an unshared type.