Documentation
¶
Overview ¶
Package decoder contains the functions that decode a JSON stream into a structured Kubernetes resource
Index ¶
- func DecodeBackup(backupDefinition []byte) (*apiv1.Backup, error)
- func DecodeClusterJSON(clusterJSON []byte) (*apiv1.Cluster, error)
- func DecodeObject(objectJSON []byte, object runtime.Object, expectedGVK schema.GroupVersionKind) error
- func DecodePodJSON(podJSON []byte) (*corev1.Pod, error)
- type WrongObjectTypeError
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DecodeBackup ¶
DecodeBackup decodes a JSON representation of a backup.
func DecodeClusterJSON ¶
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.
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.
Click to show internal directories.
Click to hide internal directories.