unitycatalog_server/codegen/external_locations/handler.rs
1// @generated — do not edit by hand.
2//! Handler trait for [`ExternalLocationHandler`].
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//! Service for managing external locations in Unity Catalog.
14//! External locations define cloud storage paths accessible via storage credentials.
15use crate::Result;
16use async_trait::async_trait;
17use unitycatalog_common::models::external_locations::v1::*;
18#[async_trait]
19pub trait ExternalLocationHandler<Cx = crate::api::RequestContext>: Send + Sync + 'static {
20 /// List external locations
21 async fn list_external_locations(
22 &self,
23 request: ListExternalLocationsRequest,
24 context: Cx,
25 ) -> Result<ListExternalLocationsResponse>;
26 /// Create a new external location
27 async fn create_external_location(
28 &self,
29 request: CreateExternalLocationRequest,
30 context: Cx,
31 ) -> Result<ExternalLocation>;
32 /// Get an external location
33 async fn get_external_location(
34 &self,
35 request: GetExternalLocationRequest,
36 context: Cx,
37 ) -> Result<ExternalLocation>;
38 /// Update an external location
39 async fn update_external_location(
40 &self,
41 request: UpdateExternalLocationRequest,
42 context: Cx,
43 ) -> Result<ExternalLocation>;
44 /// Delete an external location
45 async fn delete_external_location(
46 &self,
47 request: DeleteExternalLocationRequest,
48 context: Cx,
49 ) -> Result<()>;
50}