Documentation ¶
Index ¶
- func Add(obj1 *yaml.Node, patch *config.Patch) error
- func AddChildAtIndex(parent *yaml.Node, child *yaml.Node, value *yaml.Node) []*yaml.Node
- func AddNode(obj1 *yaml.Node, match *yaml.Node, value *yaml.Node)
- func ApplyPatches(destObj, sourceObj client.Object, patchesConf []*vclusterconfig.Patch, ...) error
- func ChildIndex(children []*yaml.Node, child *yaml.Node) int
- func ContainsChild(child *yaml.Node) func(*yaml.Node) bool
- func CopyFromObject(obj1, obj2 *yaml.Node, patch *config.Patch) error
- func Find(doc *yaml.Node, predicate func(*yaml.Node) bool) *yaml.Node
- func FindMatches(doc *yaml.Node, path string) ([]*yaml.Node, error)
- func GetNamespace(obj *yaml.Node, patch *config.Patch) (string, error)
- func NewJSONNode(raw interface{}) (*yaml.Node, error)
- func NewNode(raw interface{}) (*yaml.Node, error)
- func NewNodeFromString(in string) (*yaml.Node, error)
- func ProcessRewrite(obj *yaml.Node, patch *config.Patch, resolver NameResolver) error
- func Remove(obj1 *yaml.Node, patch *config.Patch) error
- func Replace(obj1 *yaml.Node, patch *config.Patch) error
- func ReplaceNode(doc *yaml.Node, match *yaml.Node, value *yaml.Node)
- func RewriteLabelExpressionsSelector(obj1 *yaml.Node, patch *config.Patch, resolver NameResolver) error
- func RewriteLabelKey(obj1 *yaml.Node, patch *config.Patch, resolver NameResolver) error
- func RewriteLabelSelector(obj1 *yaml.Node, patch *config.Patch, resolver NameResolver) error
- func RewriteName(obj1 *yaml.Node, patch *config.Patch, resolver NameResolver) error
- func ValidateAllConditions(obj *yaml.Node, match *yaml.Node, conditions []*config.PatchCondition) (bool, error)
- func ValidateAndTranslateName(obj *yaml.Node, match *yaml.Node, patch *config.Patch, resolver NameResolver, ...) error
- func ValidateAndTranslateNamespace(obj *yaml.Node, match *yaml.Node, patch *config.Patch, resolver NameResolver) error
- func ValidateCondition(obj *yaml.Node, match *yaml.Node, condition *config.PatchCondition) (bool, error)
- type NameResolver
- type OpPath
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AddChildAtIndex ¶
func ApplyPatches ¶
func ApplyPatches(destObj, sourceObj client.Object, patchesConf []*vclusterconfig.Patch, reversePatchesConf []*vclusterconfig.Patch, nameResolver NameResolver) error
func NewJSONNode ¶
func ProcessRewrite ¶
func RewriteLabelKey ¶
func RewriteLabelSelector ¶
func RewriteName ¶
func ValidateAllConditions ¶
func ValidateCondition ¶
Types ¶
type NameResolver ¶
type NameResolver interface { TranslateName(name string, regex *regexp.Regexp, path string) (string, error) TranslateLabelKey(key string) (string, error) TranslateLabelExpressionsSelector(selector *metav1.LabelSelector) (*metav1.LabelSelector, error) TranslateLabelSelector(selector map[string]string) (map[string]string, error) TranslateNameWithNamespace(name string, namespace string, regex *regexp.Regexp, path string) (string, error) TranslateNamespaceRef(namespace string) (string, error) }
type OpPath ¶
type OpPath string
OpPath is an yaml-jsonpath 'selector'. For more info see: https://github.com/vmware-labs/yaml-jsonpath
Click to show internal directories.
Click to hide internal directories.