decode

package
v1.13.0-rc.6 Latest Latest
Warning

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

Go to latest
Published: Aug 26, 2022 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Overview

Package decode is used for decoding serialized data in Nomos resources.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Decoder

type Decoder interface {
	// DecodeResources reads the bytes in the RawExtensions representing k8s
	// resources and returns a slice of all the resources grouped by their
	// respective GroupVersionKind.
	DecodeResources(genericResources []v1.GenericResources) (map[schema.GroupVersionKind][]*unstructured.Unstructured, error)
	// UpdateScheme updates the scheme of the underlying decoder, so it can decode the given GroupVersionKinds.
	UpdateScheme(gvks map[schema.GroupVersionKind]bool)
}

Decoder decodes GenericResources from NamespaceConfigs / ClusterConfigs to Unstructured structs.

func NewGenericResourceDecoder

func NewGenericResourceDecoder(scheme *runtime.Scheme) Decoder

NewGenericResourceDecoder returns a new genericResourceDecoder.

Jump to

Keyboard shortcuts

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