// MarshalToYaml marshals an object into yaml. func MarshalToYaml(obj runtime.Object, gv schema.GroupVersion) ([]byte, error) { … } // MarshalToYamlForCodecs marshals an object into yaml using the specified codec // TODO: Is specifying the gv really needed here? // TODO: Can we support json out of the box easily here? func MarshalToYamlForCodecs(obj runtime.Object, gv schema.GroupVersion, codecs serializer.CodecFactory) ([]byte, error) { … } // UniversalUnmarshal unmarshals YAML or JSON into a runtime.Object using the universal deserializer. func UniversalUnmarshal(buffer []byte) (runtime.Object, error) { … } // SplitYAMLDocuments reads the YAML bytes per-document, unmarshals the TypeMeta information from each document // and returns a map between the GroupVersionKind of the document and the document bytes func SplitYAMLDocuments(yamlBytes []byte) (kubeadmapi.DocumentMap, error) { … } // GroupVersionKindsFromBytes parses the bytes and returns a gvk slice func GroupVersionKindsFromBytes(b []byte) ([]schema.GroupVersionKind, error) { … } // GroupVersionKindsHasKind returns whether the following gvk slice contains the kind given as a parameter func GroupVersionKindsHasKind(gvks []schema.GroupVersionKind, kind string) bool { … } // GroupVersionKindsHasClusterConfiguration returns whether the following gvk slice contains a ClusterConfiguration object func GroupVersionKindsHasClusterConfiguration(gvks ...schema.GroupVersionKind) bool { … } // GroupVersionKindsHasInitConfiguration returns whether the following gvk slice contains a InitConfiguration object func GroupVersionKindsHasInitConfiguration(gvks ...schema.GroupVersionKind) bool { … } // GroupVersionKindsHasJoinConfiguration returns whether the following gvk slice contains a JoinConfiguration object func GroupVersionKindsHasJoinConfiguration(gvks ...schema.GroupVersionKind) bool { … } // GroupVersionKindsHasResetConfiguration returns whether the following gvk slice contains a ResetConfiguration object func GroupVersionKindsHasResetConfiguration(gvks ...schema.GroupVersionKind) bool { … } // GroupVersionKindsHasUpgradeConfiguration returns whether the following gvk slice contains a UpgradeConfiguration object func GroupVersionKindsHasUpgradeConfiguration(gvks ...schema.GroupVersionKind) bool { … }