manta_server/backend_dispatcher/
cluster_template.rs

1//! `ClusterTemplateTrait` (BOS session template) impl for
2//! `StaticBackendDispatcher`.
3
4use super::*;
5
6impl ClusterTemplateTrait for StaticBackendDispatcher {
7  async fn get_template(
8    &self,
9    token: &str,
10    bos_session_template_id_opt: Option<&str>,
11  ) -> Result<Vec<BosSessionTemplate>, Error> {
12    dispatch!(self, get_template, token, bos_session_template_id_opt)
13  }
14
15  async fn get_and_filter_templates(
16    &self,
17    token: &str,
18    group_name_vec: &[String],
19    group_member_vec: &[String],
20    bos_sessiontemplate_name_opt: Option<&str>,
21    limit_number_opt: Option<&u8>,
22  ) -> Result<Vec<BosSessionTemplate>, Error> {
23    dispatch!(
24      self,
25      get_and_filter_templates,
26      token,
27      group_name_vec,
28      group_member_vec,
29      bos_sessiontemplate_name_opt,
30      limit_number_opt
31    )
32  }
33
34  async fn get_all_templates(
35    &self,
36    token: &str,
37  ) -> Result<Vec<BosSessionTemplate>, Error> {
38    dispatch!(self, get_all_templates, token)
39  }
40
41  async fn put_template(
42    &self,
43    token: &str,
44    bos_template: &BosSessionTemplate,
45    bos_template_name: &str,
46  ) -> Result<BosSessionTemplate, Error> {
47    dispatch!(self, put_template, token, bos_template, bos_template_name)
48  }
49
50  async fn delete_template(
51    &self,
52    token: &str,
53    bos_template_id: &str,
54  ) -> Result<(), Error> {
55    dispatch!(self, delete_template, token, bos_template_id)
56  }
57}