Versions in this module Expand all Collapse all v0 v0.0.4 Aug 15, 2023 Changes in this version + const ContentTypeJSON + const ContentTypeYAML + var ErrNoObjectMeta = errors.New(...) + var ErrNoStoredComments = errors.New("the given object does not have stored comments") + var ErrUnsupportedContentType = errors.New("unsupported content type") + var FrameOverflowErr = errors.New("frame was larger than maximum allowed size") + func GVKForObject(scheme *runtime.Scheme, obj runtime.Object) (schema.GroupVersionKind, error) + func GetCommentSource(obj runtime.Object) (*yaml.RNode, error) + func SetCommentSource(obj runtime.Object, source *yaml.RNode) error + func WriteFrameList(fw FrameWriter, frameList FrameList) error + type CRDConversionError struct + Cause CRDConversionErrorCause + Err error + GVK schema.GroupVersionKind + func NewCRDConversionError(gvk *schema.GroupVersionKind, cause CRDConversionErrorCause, err error) *CRDConversionError + func (e *CRDConversionError) Error() string + func (e *CRDConversionError) GroupVersionKind() schema.GroupVersionKind + func (e *CRDConversionError) Unwrap() error + type CRDConversionErrorCause string + const CRDConversionErrorCauseConvertFrom + const CRDConversionErrorCauseConvertTo + const CRDConversionErrorCauseInvalidArgs + const CRDConversionErrorCauseSchemeSetup + type ContentType string + type ContentTyped interface + ContentType func() ContentType + type Converter interface + Convert func(in, out runtime.Object) error + ConvertIntoNew func(in runtime.Object, gvk schema.GroupVersionKind) (runtime.Object, error) + ConvertToHub func(in runtime.Object) (runtime.Object, error) + type Decoder interface + Decode func(fr FrameReader) (runtime.Object, error) + DecodeAll func(fr FrameReader) ([]runtime.Object, error) + DecodeInto func(fr FrameReader, obj runtime.Object) error + type DecodingOptions struct + ConvertToHub *bool + DecodeListElements *bool + DecodeUnknown *bool + Default *bool + PreserveComments *bool + Strict *bool + type DecodingOptionsFunc func(*DecodingOptions) + func WithCommentsDecode(comments bool) DecodingOptionsFunc + func WithConvertToHubDecode(convert bool) DecodingOptionsFunc + func WithDecodingOptions(newOpts DecodingOptions) DecodingOptionsFunc + func WithDefaultsDecode(defaults bool) DecodingOptionsFunc + func WithListElementsDecoding(listElements bool) DecodingOptionsFunc + func WithStrictDecode(strict bool) DecodingOptionsFunc + func WithUnknownDecode(unknown bool) DecodingOptionsFunc + type Defaulter interface + Default func(objs ...runtime.Object) error + NewDefaultedObject func(gvk schema.GroupVersionKind) (runtime.Object, error) + type Encoder interface + Encode func(fw FrameWriter, obj ...runtime.Object) error + EncodeForGroupVersion func(fw FrameWriter, obj runtime.Object, gv schema.GroupVersion) error + type EncodingOptions struct + PreserveComments *bool + Pretty *bool + type EncodingOptionsFunc func(*EncodingOptions) + func WithCommentsEncode(comments bool) EncodingOptionsFunc + func WithEncodingOptions(newOpts EncodingOptions) EncodingOptionsFunc + func WithPrettyEncode(pretty bool) EncodingOptionsFunc + type FrameList [][]byte + func ReadFrameList(fr FrameReader) (FrameList, error) + type FrameReader interface + ReadFrame func() ([]byte, error) + func NewFrameReader(contentType ContentType, rc ReadCloser) FrameReader + func NewJSONFrameReader(rc ReadCloser) FrameReader + func NewYAMLFrameReader(rc ReadCloser) FrameReader + type FrameWriter interface + func NewFrameWriter(contentType ContentType, w Writer) FrameWriter + func NewJSONFrameWriter(w Writer) FrameWriter + func NewYAMLFrameWriter(w Writer) FrameWriter + type ReadCloser io.ReadCloser + func FromBytes(content []byte) ReadCloser + func FromFile(filePath string) ReadCloser + type Serializer interface + Codecs func() *k8sserializer.CodecFactory + Converter func() Converter + Decoder func(optsFn ...DecodingOptionsFunc) Decoder + Defaulter func() Defaulter + Encoder func(optsFn ...EncodingOptionsFunc) Encoder + Scheme func() *runtime.Scheme + func NewSerializer(scheme *runtime.Scheme, codecs *k8sserializer.CodecFactory) Serializer + type UnrecognizedTypeError struct + Cause UnrecognizedTypeErrorCause + Err error + GVK schema.GroupVersionKind + func NewUnrecognizedGroupError(gvk schema.GroupVersionKind, err error) *UnrecognizedTypeError + func NewUnrecognizedKindError(gvk schema.GroupVersionKind, err error) *UnrecognizedTypeError + func NewUnrecognizedVersionError(allGVs []schema.GroupVersion, gvk schema.GroupVersionKind, err error) *UnrecognizedTypeError + func (e *UnrecognizedTypeError) Error() string + func (e *UnrecognizedTypeError) GroupVersionKind() schema.GroupVersionKind + func (e *UnrecognizedTypeError) Unwrap() error + type UnrecognizedTypeErrorCause string + const UnrecognizedTypeErrorCauseUnknownGroup + const UnrecognizedTypeErrorCauseUnknownKind + const UnrecognizedTypeErrorCauseUnknownVersion + type Writer io.Writer + func ToBytes(p []byte) Writer