ops

package
v1.3.97 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Apr 29, 2024 License: MIT Imports: 31 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func JsonPathRead

func JsonPathRead(value interface{}, path string) (interface{}, error)

JsonPathRead a path from a decoded JSON array or object ([]interface{} or unstructured.Unstructured) and returns the corresponding value or an error.

The returned value type depends on the requested path and the JSON value.

func WalkUnstructured

func WalkUnstructured(in interface{}, visitor func(value interface{}) (interface{}, error)) (interface{}, error)

Types

type Executor

type Executor struct {
	Client client.Client

	Type string

	ResourceHandler func(resource *model.Resource) error
	RecordHandler   func(namespace string, resource string, record *model.Record) error
	// contains filtered or unexported fields
}

func (*Executor) Init

func (e *Executor) Init(ctx context.Context) error

func (*Executor) InitSystemOnly added in v1.3.15

func (e *Executor) InitSystemOnly()

func (*Executor) RestoreItem

func (e *Executor) RestoreItem(in unstructured.Unstructured) error

type JsonPathFilterFunc

type JsonPathFilterFunc func(value interface{}) (interface{}, error)

JsonPathFilterFunc applies a prepared json path to a JSON decoded value

func JsonPathPrepare

func JsonPathPrepare(path string) (JsonPathFilterFunc, error)

JsonPathPrepare will parse the path and return a filter function that can then be applied to decoded JSON values.

type OverrideConfig

type OverrideConfig struct {
	Namespace  string
	DataSource string
}

type ParserFunc

type ParserFunc func(reader io.Reader, consumer func(data unstructured.Unstructured) error) error

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL