Documentation
¶
Index ¶
- Constants
- func CatalogFunction(name string, keywords []string, fnTypes []v1alpha1.FunctionType) v1alpha1.Function
- func GetNames(functions []v1alpha1.Function) []string
- func MatchFunctions(functions []v1alpha1.Function, matchers ...Matcher) []v1alpha1.Function
- type KeywordsMatcher
- type Matcher
- type TypeMatcher
Constants ¶
const CatalogV2 = "__catalog_v2"
CatalogV2 is the an invalid namespace used to build catalog function into the porch v1alpha1.function struct. This namespace distinguishes catalog function from porch functions. This will be trimmed before showing to users.
Variables ¶
This section is empty.
Functions ¶
func CatalogFunction ¶
func CatalogFunction(name string, keywords []string, fnTypes []v1alpha1.FunctionType) v1alpha1.Function
CatalogFunction converts catalog function into the porch v1alpha1.function struct.
func GetNames ¶
GetNames returns the list of function names. - Porch function name is <PackageRepository>:<ImageName>:<Version>. e.g. kpt-functions:set-annotations:latest - Catalog v2 function name is trimed to only contain <ImageName>:<Version>, and exclude ghcr.io/kptdev/krm-functions-catalog. e.g. set-annotations:latest
Types ¶
type KeywordsMatcher ¶
type KeywordsMatcher struct {
Keywords []string
}
func (KeywordsMatcher) Match ¶
func (m KeywordsMatcher) Match(function v1alpha1.Function) bool
Match determines whether the `function` has keywords which match the matcher's `Keywords`. Experimental: This logic may change to only if all function keywords are found from matcher's `Keywords`, can it claims a match (return true).
type TypeMatcher ¶
type TypeMatcher struct {
FnType string
}