backend_dispatcher/contracts.rs
1use crate::error::Error;
2
3pub trait BackendTrait {
4 fn test_backend_trait(&self) -> String;
5
6 // AUTHORIZATION
7 fn get_api_token(
8 &self,
9 _site_name: &str,
10 ) -> impl std::future::Future<Output = Result<String, Error>> + Send;
11
12 /// Get list of xnames from NIDs
13 /// The list of NIDs can be:
14 /// - comma separated list of NIDs (eg: nid000001,nid000002,nid000003)
15 /// - regex (eg: nid00000.*)
16 /// - hostlist (eg: nid0000[01-15])
17 fn nid_to_xname(
18 &self,
19 auth_token: &str,
20 user_input_nid: &str,
21 is_regex: bool,
22 ) -> impl std::future::Future<Output = Result<Vec<String>, Error>> + Send;
23}