obj

package
v1.11.9 Latest Latest
Warning

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

Go to latest
Published: Sep 9, 2024 License: Apache-2.0 Imports: 20 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Decode added in v1.7.0

func Decode(bs []byte, out any) error

func DecodeAny added in v1.7.0

func DecodeAny(bs []byte, scheme *runtime.Scheme) (client.Object, error)

func DecodeAnyRuntime added in v1.10.5

func DecodeAnyRuntime(bs []byte, scheme *runtime.Scheme) (runtime.Object, error)

func DecodeInto added in v1.7.0

func DecodeInto(bs []byte, into runtime.Object, scheme *runtime.Scheme) error

Deprecaaated: use DecodeIntoT instead

func DecodeIntoT added in v1.7.0

func DecodeIntoT[T runtime.Object](bs []byte, into T, scheme *runtime.Scheme) (T, error)

func Dump added in v1.7.0

func Dump(obj client.Object, scheme *runtime.Scheme)

func Encode added in v1.7.0

func Encode(obj runtime.Object, scheme *runtime.Scheme) ([]byte, error)

func EncodeAny added in v1.10.3

func EncodeAny(obj any) ([]byte, error)

func Merge added in v1.7.0

func Merge[T runtime.Object](patch runtime.Object,
	object runtime.Object,
	result T,
	serializer runtime.Serializer,
) (T, error)

Merge applies 'source' as a patch to 'dest', returning a new object containing the merge result. It requires that 'dest' has APIVersion and Kind set. This function is dangerous to use with objects derived from yaml/json when fields don't have omitEmpty Consider a field with no omitEmpty JSON tag. If this field is not set in 'source', if will be present as an empty value in the JSON of 'source' and then overwrite whatever the field had in 'dest'.

func New added in v1.9.1

func NewRuntime added in v1.10.5

func NewRuntime(gvk schema.GroupVersionKind, scheme *runtime.Scheme) runtime.Object

func NewSerializer added in v1.7.0

func NewSerializer(scheme *runtime.Scheme) runtime.Serializer

Types

type Comparison added in v1.7.0

type Comparison struct {
	From client.Object
	To   client.Object
	// contains filtered or unexported fields
}

func NewComparison added in v1.7.0

func NewComparison(from, to client.Object, scheme *runtime.Scheme) *Comparison

func (*Comparison) AddFilter added in v1.7.0

func (c *Comparison) AddFilter(f FilterFunc)

func (*Comparison) AddRemoveDiffs added in v1.7.0

func (c *Comparison) AddRemoveDiffs(keys ...string)

func (*Comparison) ComputeDiff added in v1.7.0

func (c *Comparison) ComputeDiff() (*Diff, error)

type Diff added in v1.7.0

type Diff struct {
	From      client.Object
	To        client.Object
	FromBytes []byte
	ToBytes   []byte
	Report    *dyff.Report
}

type FilterFunc added in v1.7.0

type FilterFunc func(client.Object)

func RemoveAnnotationsFilter added in v1.7.0

func RemoveAnnotationsFilter(names ...string) FilterFunc

Jump to

Keyboard shortcuts

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