Skip to main content

DeltaApiHandler

Trait DeltaApiHandler 

Source
pub trait DeltaApiHandler<Cx>:
    Send
    + Sync
    + 'static {
    // Required methods
    fn get_config<'life0, 'async_trait>(
        &'life0 self,
        query: GetConfigQuery,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<DeltaCatalogConfig>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_staging_table<'life0, 'async_trait>(
        &'life0 self,
        path: SchemaRef,
        request: DeltaCreateStagingTableRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<DeltaStagingTableResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn create_table<'life0, 'async_trait>(
        &'life0 self,
        path: SchemaRef,
        request: DeltaCreateTableRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<DeltaLoadTableResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn load_table<'life0, 'async_trait>(
        &'life0 self,
        path: TableRef,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<DeltaLoadTableResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn update_table<'life0, 'async_trait>(
        &'life0 self,
        path: TableRef,
        request: DeltaUpdateTableRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<DeltaLoadTableResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn delete_table<'life0, 'async_trait>(
        &'life0 self,
        path: TableRef,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn table_exists<'life0, 'async_trait>(
        &'life0 self,
        path: TableRef,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn rename_table<'life0, 'async_trait>(
        &'life0 self,
        path: TableRef,
        request: DeltaRenameTableRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_table_credentials<'life0, 'async_trait>(
        &'life0 self,
        path: TableRef,
        operation: DeltaCredentialOperation,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<DeltaCredentialsResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn report_metrics<'life0, 'async_trait>(
        &'life0 self,
        path: TableRef,
        request: DeltaReportMetricsRequest,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_staging_table_credentials<'life0, 'async_trait>(
        &'life0 self,
        table_id: String,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<DeltaCredentialsResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
    fn get_temporary_path_credentials<'life0, 'async_trait>(
        &'life0 self,
        location: String,
        operation: DeltaCredentialOperation,
        context: Cx,
    ) -> Pin<Box<dyn Future<Output = Result<DeltaCredentialsResponse>> + Send + 'async_trait>>
       where Self: 'async_trait,
             'life0: 'async_trait;
}
Expand description

Handler for the Delta REST API. One method per delta.yaml operation.

Method names match the spec operationIds. Path/query parameters are passed as typed structs; request bodies use the wire model types.

Required Methods§

Source

fn get_config<'life0, 'async_trait>( &'life0 self, query: GetConfigQuery, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<DeltaCatalogConfig>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /delta/v1/config

Source

fn create_staging_table<'life0, 'async_trait>( &'life0 self, path: SchemaRef, request: DeltaCreateStagingTableRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<DeltaStagingTableResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

POST /delta/v1/catalogs/{catalog}/schemas/{schema}/staging-tables

Source

fn create_table<'life0, 'async_trait>( &'life0 self, path: SchemaRef, request: DeltaCreateTableRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<DeltaLoadTableResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

POST /delta/v1/catalogs/{catalog}/schemas/{schema}/tables

Source

fn load_table<'life0, 'async_trait>( &'life0 self, path: TableRef, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<DeltaLoadTableResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /delta/v1/catalogs/{catalog}/schemas/{schema}/tables/{table}

Source

fn update_table<'life0, 'async_trait>( &'life0 self, path: TableRef, request: DeltaUpdateTableRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<DeltaLoadTableResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

POST /delta/v1/catalogs/{catalog}/schemas/{schema}/tables/{table}

Source

fn delete_table<'life0, 'async_trait>( &'life0 self, path: TableRef, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

DELETE /delta/v1/catalogs/{catalog}/schemas/{schema}/tables/{table}

Source

fn table_exists<'life0, 'async_trait>( &'life0 self, path: TableRef, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

HEAD /delta/v1/catalogs/{catalog}/schemas/{schema}/tables/{table}

Source

fn rename_table<'life0, 'async_trait>( &'life0 self, path: TableRef, request: DeltaRenameTableRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

POST /delta/v1/catalogs/{catalog}/schemas/{schema}/tables/{table}/rename

Source

fn get_table_credentials<'life0, 'async_trait>( &'life0 self, path: TableRef, operation: DeltaCredentialOperation, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<DeltaCredentialsResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /delta/v1/catalogs/{catalog}/schemas/{schema}/tables/{table}/credentials

Source

fn report_metrics<'life0, 'async_trait>( &'life0 self, path: TableRef, request: DeltaReportMetricsRequest, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<()>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

POST /delta/v1/catalogs/{catalog}/schemas/{schema}/tables/{table}/metrics

Source

fn get_staging_table_credentials<'life0, 'async_trait>( &'life0 self, table_id: String, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<DeltaCredentialsResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /delta/v1/staging-tables/{table_id}/credentials

Source

fn get_temporary_path_credentials<'life0, 'async_trait>( &'life0 self, location: String, operation: DeltaCredentialOperation, context: Cx, ) -> Pin<Box<dyn Future<Output = Result<DeltaCredentialsResponse>> + Send + 'async_trait>>
where Self: 'async_trait, 'life0: 'async_trait,

GET /delta/v1/temporary-path-credentials

Dyn Compatibility§

This trait is dyn compatible.

In older versions of Rust, dyn compatibility was called "object safety".

Implementors§

Source§

impl<B, Cx> DeltaApiHandler<Cx> for B
where B: DeltaBackend<Cx>, Cx: Send + 'static,