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

Function webActionAnnotations

commands/action.go:782–796  ·  view source on GitHub ↗
(
	preserveAnnotations bool,
	annotations whisk.KeyValueArr,
	entityName string,
	webActionAnnotationMethod WebActionAnnotationMethod,
	existingAction *whisk.Action)

Source from the content-addressed store, hash-verified

780type WebActionAnnotationMethod func(annotations whisk.KeyValueArr) whisk.KeyValueArr
781
782func webActionAnnotations(
783 preserveAnnotations bool,
784 annotations whisk.KeyValueArr,
785 entityName string,
786 webActionAnnotationMethod WebActionAnnotationMethod,
787 existingAction *whisk.Action) (whisk.KeyValueArr, error) {
788
789 if preserveAnnotations && existingAction != nil {
790 annotations = whisk.KeyValueArr.AppendKeyValueArr(annotations, existingAction.Annotations)
791 }
792
793 annotations = webActionAnnotationMethod(annotations)
794
795 return annotations, nil
796}
797
798func addWebAnnotations(annotations whisk.KeyValueArr) whisk.KeyValueArr {
799 annotations = deleteWebAnnotationKeys(annotations)

Callers 1

webActionFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected