1+ use std:: sync:: Arc ;
2+
13use hyper:: StatusCode ;
24use info_fetcher_commons:: http_error;
35use serde:: { Deserialize , Serialize } ;
@@ -26,8 +28,6 @@ pub struct ResourceInfoRequest {
2628
2729#[ derive( Debug , Clone , PartialEq , Eq , Hash , Deserialize ) ]
2830#[ serde( rename_all = "camelCase" ) ]
29- // Soon there will be something else than Trino
30- #[ expect( clippy:: enum_variant_names) ]
3131pub enum ResourceInfoRequestResource {
3232 TrinoTable {
3333 catalog : String ,
@@ -41,6 +41,11 @@ pub enum ResourceInfoRequestResource {
4141 TrinoCatalog {
4242 catalog : String ,
4343 } ,
44+
45+ SupersetChart ( String ) ,
46+ SupersetDashboard ( String ) ,
47+
48+ RawDataHubUrn ( String ) ,
4449}
4550
4651#[ derive( Snafu , Debug ) ]
@@ -53,6 +58,14 @@ pub enum GetResourceInfoError {
5358 display( "failed to get resource information from DataHub" )
5459 ) ]
5560 DataHub { source : backend:: data_hub:: Error } ,
61+
62+ #[ snafu(
63+ visibility( pub ( crate ) ) ,
64+ display( "failed to get user information from DataHub" )
65+ ) ]
66+ GetDataHubUser {
67+ source : Arc < backend:: data_hub:: Error > ,
68+ } ,
5669}
5770
5871impl http_error:: Error for GetResourceInfoError {
@@ -66,6 +79,7 @@ impl http_error::Error for GetResourceInfoError {
6679 match self {
6780 Self :: SerializeResponseAsJson { .. } => StatusCode :: INTERNAL_SERVER_ERROR ,
6881 Self :: DataHub { source } => source. status_code ( ) ,
82+ Self :: GetDataHubUser { source } => source. status_code ( ) ,
6983 }
7084 }
7185}
0 commit comments