Skip to main content

unitycatalog_server/codegen/credentials/
handler.rs

1// @generated — do not edit by hand.
2//! Handler trait for [`CredentialHandler`].
3//!
4//! Implement this trait to provide a custom backend for this service, then mount the
5//! generated handler functions (in the sibling `server` module) onto an `axum::Router`
6//! with your implementation as state.
7//!
8//! # Composability
9//!
10//! A single struct can implement multiple handler traits to serve multiple
11//! services. Use [`axum::Router::merge`] to compose per-service routers together.
12//!
13//! Manage credentials to access external data sources and services
14//! as well as generate signed urls for the Delta Sharing service.
15use crate::Result;
16use async_trait::async_trait;
17use unitycatalog_common::models::credentials::v1::*;
18#[async_trait]
19pub trait CredentialHandler<Cx = crate::api::RequestContext>: Send + Sync + 'static {
20    async fn list_credentials(
21        &self,
22        request: ListCredentialsRequest,
23        context: Cx,
24    ) -> Result<ListCredentialsResponse>;
25    async fn create_credential(
26        &self,
27        request: CreateCredentialRequest,
28        context: Cx,
29    ) -> Result<Credential>;
30    async fn get_credential(
31        &self,
32        request: GetCredentialRequest,
33        context: Cx,
34    ) -> Result<Credential>;
35    async fn update_credential(
36        &self,
37        request: UpdateCredentialRequest,
38        context: Cx,
39    ) -> Result<Credential>;
40    async fn delete_credential(&self, request: DeleteCredentialRequest, context: Cx) -> Result<()>;
41}