@@ -12,26 +12,32 @@ use serde_json::Value;
12
12
use std:: fmt:: Display ;
13
13
14
14
pub mod add;
15
+ pub mod and;
15
16
pub mod base64;
17
+ pub mod bool;
16
18
pub mod concat;
17
19
pub mod create_array;
18
20
pub mod div;
19
21
pub mod envvar;
20
22
pub mod equals;
21
23
pub mod r#if;
24
+ pub mod r#false;
22
25
pub mod format;
23
26
pub mod int;
24
27
pub mod max;
25
28
pub mod min;
26
29
pub mod mod_function;
27
30
pub mod mul;
31
+ pub mod not;
32
+ pub mod or;
28
33
pub mod parameters;
29
34
pub mod path;
30
35
pub mod reference;
31
36
pub mod resource_id;
32
37
pub mod secret;
33
38
pub mod sub;
34
39
pub mod system_root;
40
+ pub mod r#true;
35
41
pub mod variables;
36
42
37
43
/// The kind of argument that a function accepts.
@@ -77,26 +83,32 @@ impl FunctionDispatcher {
77
83
pub fn new ( ) -> Self {
78
84
let mut functions: HashMap < String , Box < dyn Function > > = HashMap :: new ( ) ;
79
85
functions. insert ( "add" . to_string ( ) , Box :: new ( add:: Add { } ) ) ;
86
+ functions. insert ( "and" . to_string ( ) , Box :: new ( and:: And { } ) ) ;
80
87
functions. insert ( "base64" . to_string ( ) , Box :: new ( base64:: Base64 { } ) ) ;
88
+ functions. insert ( "bool" . to_string ( ) , Box :: new ( bool:: Bool { } ) ) ;
81
89
functions. insert ( "concat" . to_string ( ) , Box :: new ( concat:: Concat { } ) ) ;
82
90
functions. insert ( "createArray" . to_string ( ) , Box :: new ( create_array:: CreateArray { } ) ) ;
83
91
functions. insert ( "div" . to_string ( ) , Box :: new ( div:: Div { } ) ) ;
84
92
functions. insert ( "envvar" . to_string ( ) , Box :: new ( envvar:: Envvar { } ) ) ;
85
93
functions. insert ( "equals" . to_string ( ) , Box :: new ( equals:: Equals { } ) ) ;
94
+ functions. insert ( "false" . to_string ( ) , Box :: new ( r#false:: False { } ) ) ;
86
95
functions. insert ( "if" . to_string ( ) , Box :: new ( r#if:: If { } ) ) ;
87
96
functions. insert ( "format" . to_string ( ) , Box :: new ( format:: Format { } ) ) ;
88
97
functions. insert ( "int" . to_string ( ) , Box :: new ( int:: Int { } ) ) ;
89
98
functions. insert ( "max" . to_string ( ) , Box :: new ( max:: Max { } ) ) ;
90
99
functions. insert ( "min" . to_string ( ) , Box :: new ( min:: Min { } ) ) ;
91
100
functions. insert ( "mod" . to_string ( ) , Box :: new ( mod_function:: Mod { } ) ) ;
92
101
functions. insert ( "mul" . to_string ( ) , Box :: new ( mul:: Mul { } ) ) ;
102
+ functions. insert ( "not" . to_string ( ) , Box :: new ( not:: Not { } ) ) ;
103
+ functions. insert ( "or" . to_string ( ) , Box :: new ( or:: Or { } ) ) ;
93
104
functions. insert ( "parameters" . to_string ( ) , Box :: new ( parameters:: Parameters { } ) ) ;
94
105
functions. insert ( "path" . to_string ( ) , Box :: new ( path:: Path { } ) ) ;
95
106
functions. insert ( "reference" . to_string ( ) , Box :: new ( reference:: Reference { } ) ) ;
96
107
functions. insert ( "resourceId" . to_string ( ) , Box :: new ( resource_id:: ResourceId { } ) ) ;
97
108
functions. insert ( "secret" . to_string ( ) , Box :: new ( secret:: Secret { } ) ) ;
98
109
functions. insert ( "sub" . to_string ( ) , Box :: new ( sub:: Sub { } ) ) ;
99
110
functions. insert ( "systemRoot" . to_string ( ) , Box :: new ( system_root:: SystemRoot { } ) ) ;
111
+ functions. insert ( "true" . to_string ( ) , Box :: new ( r#true:: True { } ) ) ;
100
112
functions. insert ( "variables" . to_string ( ) , Box :: new ( variables:: Variables { } ) ) ;
101
113
Self {
102
114
functions,
0 commit comments