Documentation
¶
Index ¶
- func Add(node, newNode *yaml.RNode) (err error)
- func Delete(node *yaml.RNode, filters []yaml.Filter, pathParts []PathPart, operandIdx int) (err error)
- func SetNodeAtPath(rootNode *yaml.RNode, node *yaml.RNode, filters []yaml.Filter, ...) error
- func Update(node, newNode *yaml.RNode) (*yaml.RNode, error)
- type ChangeType
- type PartType
- type PathPart
- type TransformTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Delete ¶
func Delete(node *yaml.RNode, filters []yaml.Filter, pathParts []PathPart, operandIdx int) (err error)
Deletes data at the path
Types ¶
type ChangeType ¶
type ChangeType string
const ( ChangeTypeAdd ChangeType = "add" ChangeTypeUpdate ChangeType = "update" ChangeTypeDelete ChangeType = "delete" )
type PathPart ¶ added in v0.14.0
func PathToParts ¶ added in v0.14.0
PathToParts converts the path string into a slice of pathParts
func ResolvePathWithFilters ¶ added in v0.14.0
ResolvePathWithFilters converts a path to its individual parts which define the type of part along with the appropriate kyaml filters to apply to the path
type TransformTarget ¶
func CreateTransformTarget ¶
func CreateTransformTarget(parent map[string]interface{}) (*TransformTarget, error)
func (*TransformTarget) ExecuteTransform ¶
func (t *TransformTarget) ExecuteTransform(path string, cType ChangeType, value string, valueMap map[string]interface{}) (map[string]interface{}, error)
func (*TransformTarget) UpdateRootNode ¶ added in v0.14.0
func (t *TransformTarget) UpdateRootNode(node *yaml.RNode) (map[string]interface{}, error)
UpdateRootNode updates the root node of the transform target and returns the updated node as a map[string]interface{}
Click to show internal directories.
Click to hide internal directories.