ephemeris_forge_github/api/operations/
variables.rs1use ephemeris_forge::RepoRef;
2
3use crate::api::error::ForgeError;
4use crate::api::model::Variable;
5use crate::api::request::{VariableBody, VariableScope};
6
7pub trait VariablesApi {
9 fn create_variable(
11 &self,
12 repository: &RepoRef,
13 scope: &VariableScope,
14 variable: &VariableBody,
15 ) -> impl Future<Output = Result<(), ForgeError>> + Send;
16
17 fn delete_variable(
19 &self,
20 repository: &RepoRef,
21 scope: &VariableScope,
22 name: &str,
23 ) -> impl Future<Output = Result<(), ForgeError>> + Send;
24
25 fn update_variable(
27 &self,
28 repository: &RepoRef,
29 scope: &VariableScope,
30 variable: &VariableBody,
31 ) -> impl Future<Output = Result<(), ForgeError>> + Send;
32
33 fn variables(
35 &self,
36 repository: &RepoRef,
37 scope: &VariableScope,
38 ) -> impl Future<Output = Result<Vec<Variable>, ForgeError>> + Send;
39}