forked from project-flogo/contrib
-
Notifications
You must be signed in to change notification settings - Fork 0
/
descriptor.json
183 lines (183 loc) · 3.8 KB
/
descriptor.json
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
{
"name": "coerce",
"type": "flogo:function",
"version": "0.10.0",
"title": "Coerce Type Functions",
"description": "Function for type coercion/conversion",
"homepage": "https://github.com/prject-flogo/contrib/tree/master/function/coerce",
"functions": [
{
"name": "toType",
"description": "convert value to specified type",
"example": "coerce.toType(\"123\",\"int\") => 123",
"args": [
{
"name": "value",
"type": "any"
},
{
"name": "type",
"type": "string"
}
],
"return": {
"type": "any"
}
},
{
"name": "toString",
"description": "convert value to a string",
"example": "coerce.toString(123) => \"123\"",
"args": [
{
"name": "value",
"type": "any"
}
],
"return": {
"type": "string"
}
},
{
"name": "toInt",
"description": "convert value to an int",
"example": "coerce.toInt(\"333\") => 333",
"args": [
{
"name": "value",
"type": "any"
}
],
"return": {
"type": "int"
}
},
{
"name": "toInt32",
"description": "convert value to an int32",
"example": "coerce.toInt32(\"333\") => 333",
"args": [
{
"name": "value",
"type": "any"
}
],
"return": {
"type": "int32"
}
},
{
"name": "toInt64",
"description": "convert value to a int64",
"example": "coerce.toInt64(\"333\") => 333",
"args": [
{
"name": "value",
"type": "any"
}
],
"return": {
"type": "int64"
}
},
{
"name": "toFloat32",
"description": "convert value to a float32",
"example": "coerce.toFloat32(\"3.3\") => 3.3",
"args": [
{
"name": "value",
"type": "any"
}
],
"return": {
"type": "float32"
}
},
{
"name": "toFloat64",
"description": "convert value to a float64",
"example": "coerce.toFloat64(\"3.3\") => 3.3",
"args": [
{
"name": "value",
"type": "any"
}
],
"return": {
"type": "float64"
}
},
{
"name": "toBool",
"description": "convert value to a bool",
"example": "coerce.toBool(\"true\") => true",
"args": [
{
"name": "value",
"type": "any"
}
],
"return": {
"type": "bool"
}
},
{
"name": "toBytes",
"description": "convert value to bytes",
"example": "coerce.toBytes(\"hello\") => byte data",
"args": [
{
"name": "value",
"type": "any"
}
],
"return": {
"type": "bytes"
}
},
{
"name": "toParams",
"description": "convert value to params",
"example": "coerce.toParams($activity[xxx].xxx) => string name-value map",
"args": [
{
"name": "value",
"type": "any"
}
],
"return": {
"type": "params"
}
},
{
"name": "toObject",
"example": "coerce.toObject($activity[xxx].xxx) => Json object",
"description": "convert value to an object",
"args": [
{
"name": "value",
"type": "any"
}
],
"return": {
"type": "object"
}
},
{
"name": "toArray",
"description": "convert value to an array",
"example": "coerce.toArray($activity[xxx].xxx) => Json array",
"args": [
{
"name": "value",
"type": "any"
}
],
"return": {
"type": "array",
"valueType": "any"
}
}
]
}