get.porter.sh/porter@v1.3.0/pkg/manifest/actions.go (about)

     1  package manifest
     2  
     3  import (
     4  	"get.porter.sh/porter/pkg/cnab"
     5  )
     6  
     7  // IsCoreAction determines if the value is a core action from the CNAB spec.
     8  func IsCoreAction(value string) bool {
     9  	for _, a := range GetCoreActions() {
    10  		if value == a {
    11  			return true
    12  		}
    13  	}
    14  	return false
    15  }
    16  
    17  func GetCoreActions() []string {
    18  	return []string{cnab.ActionInstall, cnab.ActionUpgrade, cnab.ActionUninstall}
    19  }