-
Notifications
You must be signed in to change notification settings - Fork 49
/
manifest.yaml
227 lines (225 loc) · 10.1 KB
/
manifest.yaml
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
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
#
# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements. See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License. You may obtain a copy of the License at
#
# http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
#
project:
name: WhiskSystem
packages:
samples:
license: Apache-2.0
version: 0.0.1
public: true
annotations:
description: "A suite of simple actions to help you get started with OpenWhisk"
actions:
cat:
version: 0.0.1
function: cat/swift/cat.swift
annotations:
description: "Equivalent to unix cat command"
parameters: [
{
"name": "lines",
"required": true,
"description": "an array of strings",
}
]
sampleInput: {"lines": [1,2,3]}
sampleOutput: {
"lines": [
1,
2,
3
],
"payload": "1\n2\n3\n"
}
countdown:
version: 0.0.1
function: countdown/javascript/countdown.js
annotations:
description: "An action that invokes itself recursively, programmatically using whisk API"
parameters: [
{
"name": "n",
"required": false,
"description": "number of times the action needs to be invoked"
}
]
sampleInput: { "n": 5 }
sampleOutput: { "activationId": "10f95a603b6c4966b95a603b6cd96643" }
sampleLogOutput: "2018-11-12T20:27:50.12223688Z stdout: 4"
curl:
version: 0.0.1
function: curl/javascript/curl.js
annotations:
description: "Curl a host url"
parameters: [
{
"name": "payload",
"required": true,
"description":"A host url"
}
]
sampleInput: { "payload": "google.com" }
sampleOutput: { "msg": "content returned from google.com" }
greeting:
version: 0.0.1
function: greeting/javascript/greeting.js
annotations:
description: "Returns a friendly greeting"
parameters: [
{
"name": "name",
"required":false
},
{
"name": "place",
"required":false,
"description":"The string to be included in the return value"
}
]
sampleInput: {
"payload": "Cat",
"place": "Narrowsburg"
}
sampleOutput: { "payload": "Hello, Cat from Narrowsburg!" }
sampleLogOutput: "2016-03-22T01:07:08.384982272Z stdout: params: { place: 'Narrowsburg', payload: 'Cat' }"
head:
version: 0.0.1
function: head/swift/head.swift
annotations:
description: "returns the first num lines of an array"
parameters: [
{
"name": "lines",
"required": true,
"description": "an array of strings"
},
{
"name": "num",
"required": false,
"description": "number of lines to return"
}
]
sampleInput: {
"lines": [1,2,3,4],
"num": 2
}
sampleOutput: {
"lines": [
1,
2
],
"num": 2
}
helloWorld:
version: 0.0.1
function: hello/javascript/hello.js
annotations:
description: "Demonstrates logging facilities"
parameters: [
{
"name": "payload",
"required":false,
"description":"The string to be included in the log record"
}
]
sampleInput: { "payload": "Cat" }
sampleOutput: { }
sampleLogOutput: "2016-03-22T01:02:26.387624916Z stdout: hello Cat!"
helloPromises:
version: 0.0.1
function: helloPromises/javascript/helloPromises.js
annotations:
description: "Return a hello message as an array of strings which demonstrates the use of returning a Promise for asynchronous actions."
parameters: [
{
"name": "name",
"required":false
},
{
"name": "place",
"required":false,
"description":"The string to be included in the return value"
}
]
sampleInput: {
"payload": "Cat",
"place": "Narrowsburg"
}
sampleOutput: {
"lines": [
"Hello,",
"Cat",
"from",
"Narrowsburg!"
]
}
invoke:
version: 0.0.1
function: invoke/swift/invoke.swift
annotations:
description: "Invoke date action and parse date from the response to display"
parameters: []
sampleInput: {}
sampleOutput: "date: 2018-11-13T05:23:04.792Z"
sampleLogOutput: "2018-11-13T05:23:04.797318072Z stdout: It is now Tue Nov 13 2018 05:23:04 GMT+0000 (UTC)"
printParams:
version: 0.0.1
function: printParams/javascript/printParams.js
annotations:
description: "print the parameters to the console, sorted alphabetically by key"
parameters: []
sampleInput: {
"x": 1,
"b": 5,
"z": 2
}
sampleOutput: {
"params": {
"b": 2,
"x": 1,
"z": 4
}
}
wordCount:
version: 0.0.1
function: wordcount/javascript/wordcount.js
annotations:
description: "Count words in a string"
parameters: [
{
"name": "payload",
"required":true,
"description":"A string"
}
]
sampleInput: { "payload": "Five fuzzy felines"}
sampleOutput: { "count": 3 }
sampleLogOutput: "2016-03-22T01:10:07.361649586Z stdout: The message 'Five fuzzy felines' has 3 words"
wordCountAsync:
version: 0.0.1
function: wordcountAsync/javascript/wordcountAsync.js
annotations:
"description": "word count utility, coded as an asynchronous action for pedagogical purposes"
parameters: [
{
"name": "payload",
"required":true,
"description":"A string"
}
]
sampleInput: { "payload": "Five fuzzy felines"}
sampleOutput: { "count": 3 }