@@ -38,23 +38,22 @@ pub struct SecurityTetraplet {
38
38
/// Name of a function that returned corresponding value.
39
39
pub function_name : String ,
40
40
41
- /// Value was produced by applying this `json_path` to the output from `call_service`.
42
- // TODO: since it's not a json path anymore, it's needed to rename it to lambda
43
- pub json_path : String ,
41
+ /// Value was produced by applying this `lambda` to the output from `call_service`.
42
+ pub lambda : String ,
44
43
}
45
44
46
45
impl SecurityTetraplet {
47
46
pub fn new (
48
47
peer_pk : impl Into < String > ,
49
48
service_id : impl Into < String > ,
50
49
function_name : impl Into < String > ,
51
- json_path : impl Into < String > ,
50
+ lambda : impl Into < String > ,
52
51
) -> Self {
53
52
Self {
54
53
peer_pk : peer_pk. into ( ) ,
55
54
service_id : service_id. into ( ) ,
56
55
function_name : function_name. into ( ) ,
57
- json_path : json_path . into ( ) ,
56
+ lambda : lambda . into ( ) ,
58
57
}
59
58
}
60
59
@@ -66,13 +65,13 @@ impl SecurityTetraplet {
66
65
peer_pk : init_peer_id. into ( ) ,
67
66
service_id : String :: new ( ) ,
68
67
function_name : String :: new ( ) ,
69
- // json path can't be applied to the string literals
70
- json_path : String :: new ( ) ,
68
+ // lambda can't be applied to the string literals
69
+ lambda : String :: new ( ) ,
71
70
}
72
71
}
73
72
74
- pub fn add_lambda ( & mut self , json_path : & str ) {
75
- self . json_path . push_str ( json_path )
73
+ pub fn add_lambda ( & mut self , lambda : & str ) {
74
+ self . lambda . push_str ( lambda )
76
75
}
77
76
}
78
77
@@ -139,8 +138,8 @@ impl fmt::Display for SecurityTetraplet {
139
138
fn fmt ( & self , f : & mut fmt:: Formatter < ' _ > ) -> fmt:: Result {
140
139
write ! (
141
140
f,
142
- "peer_pk: {}, service_id: {}, function_name: {}, json_path : {}" ,
143
- self . peer_pk, self . service_id, self . function_name, self . json_path
141
+ "peer_pk: {}, service_id: {}, function_name: {}, lambda : {}" ,
142
+ self . peer_pk, self . service_id, self . function_name, self . lambda
144
143
)
145
144
}
146
145
}
0 commit comments