decoder

package
v0.1.2 Latest Latest
Warning

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

Go to latest
Published: Feb 27, 2025 License: Apache-2.0 Imports: 6 Imported by: 0

Documentation

Overview

Package decoder contains the functions that decode a JSON stream into a structured Kubernetes resource

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DecodeBackup

func DecodeBackup(backupDefinition []byte) (*apiv1.Backup, error)

DecodeBackup decodes a JSON representation of a backup.

func DecodeClusterJSON

func DecodeClusterJSON(clusterJSON []byte) (*apiv1.Cluster, error)

DecodeClusterJSON decodes a JSON representation of a cluster.

func DecodeObject

func DecodeObject(objectJSON []byte, object runtime.Object, expectedGVK schema.GroupVersionKind) error

DecodeObject decodes a JSON representation of an object.

func DecodePodJSON

func DecodePodJSON(podJSON []byte) (*corev1.Pod, error)

DecodePodJSON decodes a JSON representation of a pod.

Types

type WrongObjectTypeError

type WrongObjectTypeError struct {
	// contains filtered or unexported fields
}

WrongObjectTypeError is raised when the GVK of the passed JSON object is different from the expected one.

func (*WrongObjectTypeError) Error

func (e *WrongObjectTypeError) Error() string

Error implements the error interface.

Jump to

Keyboard shortcuts

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