Documentation
¶
Overview ¶
Package decoder contains the functions that decode a JSON stream into a structured Kubernetes resource
Index ¶
- func DecodeBackupLenient(backupDefinition []byte) (*apiv1.Backup, error)
- func DecodeBackupStrict(backupDefinition []byte) (*apiv1.Backup, error)
- func DecodeClusterLenient(clusterJSON []byte) (*apiv1.Cluster, error)
- func DecodeClusterStrict(clusterJSON []byte) (*apiv1.Cluster, error)
- func DecodeObjectLenient(objectJSON []byte, object runtime.Object) error
- func DecodeObjectStrict(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 DecodeBackupLenient ¶ added in v0.2.0
DecodeBackupLenient decodes a JSON representation of a backup.
func DecodeBackupStrict ¶ added in v0.2.0
DecodeBackupStrict decodes a JSON representation of a backup.
func DecodeClusterLenient ¶ added in v0.2.0
DecodeClusterLenient decodes a JSON representation of a cluster.
func DecodeClusterStrict ¶ added in v0.2.0
DecodeClusterStrict decodes a JSON representation of a cluster.
func DecodeObjectLenient ¶ added in v0.2.0
DecodeObjectLenient decodes a JSON representation of an object.
func DecodeObjectStrict ¶ added in v0.2.0
func DecodeObjectStrict(objectJSON []byte, object runtime.Object, expectedGVK schema.GroupVersionKind) error
DecodeObjectStrict 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.