Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Serializer ¶
type Serializer interface { // DecodeInto takes byte content and a target object to serialize the data into DecodeInto(content []byte, obj runtime.Object) error // DecodeFileInto takes a file path and a target object to serialize the data into DecodeFileInto(filePath string, obj runtime.Object) error // Decode takes byte content and returns the target object Decode(content []byte, internal bool) (runtime.Object, error) // DecodeFile takes a file path and returns the target object DecodeFile(filePath string, internal bool) (runtime.Object, error) // EncodeYAML encodes the specified object for a specific version to YAML bytes EncodeYAML(obj runtime.Object) ([]byte, error) // EncodeJSON encodes the specified object for a specific version to pretty JSON bytes EncodeJSON(obj runtime.Object) ([]byte, error) // DefaultInternal populates the given internal object with the preferred external version's defaults DefaultInternal(cfg runtime.Object) error // Scheme provides access to the underlying runtime.Scheme Scheme() *runtime.Scheme }
Serializer is an interface providing high-level decoding/encoding functionality for types registered in a *runtime.Scheme
func NewSerializer ¶
func NewSerializer(scheme *runtime.Scheme, codecs *k8sserializer.CodecFactory) Serializer
NewSerializer constructs a new serializer based on a scheme, and optionally a codecfactory
Click to show internal directories.
Click to hide internal directories.