// Package fn defines the function interface that GItOps functions will // implement to make them easily runnable by both the Chariot web server and Kpt // binary. package fn import "sigs.k8s.io/kustomize/kyaml/yaml" // Function is the interface that our GitOps functions must implement to integrate // with both Kpt (ran via command line) and Chariot (ran via HTTP). // // It is provided (and outputs) a *yaml.RNode slice representing all of // the yaml files in the repository. // // Input and output of the function must contain a `kioutil.PathAnnotation` annotation set // to the yaml file's relative path in the repository. Failure to provide path annotations // will cause the function to return an error. type Function interface { Run([]*yaml.RNode) ([]*yaml.RNode, error) }