Skip to main content

RegistryHandler

Trait RegistryHandler 

Source
pub trait RegistryHandler: RepoHandler {
Show 13 methods // Required methods fn handle_list<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn handle_get<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_get_by_name<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_clone<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 CloneRequest, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_register<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 RegisterRequest, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_remove<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_health_check<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait; fn handle_clone_stream<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 CloneRequest, ) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_get_blob<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 GetBlobRequest, ) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_put_blob<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 PutBlobRequest, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; fn handle_ingest_at9p_candidate<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 At9pCandidateRequest, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait; // Provided methods fn authorize<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, resource: &'life2 str, operation: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... } fn is_resource_authorized<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, resource: &'life2 str, operation: &'life3 str, ) -> Pin<Box<dyn Future<Output = bool> + 'async_trait>> where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait { ... }
}
Expand description

Generated handler trait for the Registry service.

Required Methods§

Source

fn handle_list<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle list request.

Source

fn handle_get<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle get request.

Source

fn handle_get_by_name<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle getByName request.

Source

fn handle_clone<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 CloneRequest, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle clone request.

Source

fn handle_register<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 RegisterRequest, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle register request.

Source

fn handle_remove<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, value: &'life2 str, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle remove request.

Source

fn handle_health_check<'life0, 'life1, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait,

Handle healthCheck request.

Source

fn handle_clone_stream<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 CloneRequest, ) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle cloneStream streaming request. Returns (StreamInfo, mandatory continuation).

Source

fn handle_get_blob<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 GetBlobRequest, ) -> Pin<Box<dyn Future<Output = Result<(StreamInfo, Continuation)>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle getBlob streaming request. Returns (StreamInfo, mandatory continuation).

Source

fn handle_put_blob<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 PutBlobRequest, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle putBlob request.

Source

fn handle_ingest_at9p_candidate<'life0, 'life1, 'life2, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, request_id: u64, data: &'life2 At9pCandidateRequest, ) -> Pin<Box<dyn Future<Output = Result<RegistryResponseVariant>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait,

Handle ingestAt9pCandidate request.

Provided Methods§

Source

fn authorize<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, resource: &'life2 str, operation: &'life3 str, ) -> Pin<Box<dyn Future<Output = Result<()>> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Authorize an operation on a resource. Override to enforce policy.

Called by generated dispatch functions before handler methods. Every method carries a mandatory $scope/$capability annotation (S3, #547) except explicit $scopeExempt methods, which are not gated here. Default: deny all. Services MUST override to enable access.

Source

fn is_resource_authorized<'life0, 'life1, 'life2, 'life3, 'async_trait>( &'life0 self, ctx: &'life1 EnvelopeContext, resource: &'life2 str, operation: &'life3 str, ) -> Pin<Box<dyn Future<Output = bool> + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait, 'life1: 'async_trait, 'life2: 'async_trait, 'life3: 'async_trait,

Check if a specific resource+operation is authorized (non-failing).

Useful for filtering list results per-resource. Default delegates to authorize().is_ok().

Implementors§