MCPcopy Create free account
hub / github.com/apache/openwhisk-cli / printPackageSummary

Function printPackageSummary

commands/util.go:365–386  ·  view source on GitHub ↗
(pkg *whisk.Package)

Source from the content-addressed store, hash-verified

363}
364
365func printPackageSummary(pkg *whisk.Package) {
366 printEntitySummary(fmt.Sprintf("%7s", "package"), getFullName(pkg.Namespace, pkg.Name, ""),
367 getValueString(pkg.Annotations, "description"),
368 strings.Join(getParamUnion(pkg.Annotations, pkg.Parameters, "name"), ", "))
369
370 if pkg.Actions != nil {
371 for _, action := range pkg.Actions {
372 paramUnion := getParamUnion(action.Annotations, action.Parameters, "name")
373 printEntitySummary(fmt.Sprintf("%7s", "action"), getFullName(pkg.Namespace, pkg.Name, action.Name),
374 getValueString(action.Annotations, "description"),
375 strings.Join(paramUnion, ", "))
376 }
377 }
378
379 if pkg.Feeds != nil {
380 for _, feed := range pkg.Feeds {
381 printEntitySummary(fmt.Sprintf("%7s", "feed "), getFullName(pkg.Namespace, pkg.Name, feed.Name),
382 getValueString(feed.Annotations, "description"),
383 strings.Join(getParamUnion(feed.Annotations, feed.Parameters, "name"), ", "))
384 }
385 }
386}
387
388func printActionSummary(action *whisk.Action) {
389 paramUnion := getParamUnion(action.Annotations, action.Parameters, "name")

Callers 1

printSummaryFunction · 0.85

Calls 4

printEntitySummaryFunction · 0.85
getFullNameFunction · 0.85
getValueStringFunction · 0.85
getParamUnionFunction · 0.85

Tested by

no test coverage detected