Documentation ¶
Index ¶
- func UnsafeObjectConvertor(scheme *Scheme) runtime.ObjectConvertor
- type Scheme
- func (s *Scheme) Convert(in, out, context interface{}) error
- func (s *Scheme) ConvertFieldLabel(gvk schema.GroupVersionKind, label, value string) (string, string, error)
- func (s *Scheme) ConvertToVersion(in runtime.Object, target runtime.GroupVersioner) (runtime.Object, error)
- func (s *Scheme) Default(_ runtime.Object)
- func (s *Scheme) New(kind schema.GroupVersionKind) (runtime.Object, error)
- func (s *Scheme) ObjectKinds(obj runtime.Object) (gvks []schema.GroupVersionKind, unversionedType bool, err error)
- func (s *Scheme) Recognizes(gvk schema.GroupVersionKind) bool
- func (s *Scheme) UnsafeConvert(in, out, context interface{}) error
- func (s *Scheme) UnsafeConvertToVersion(in runtime.Object, target runtime.GroupVersioner) (runtime.Object, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func UnsafeObjectConvertor ¶
func UnsafeObjectConvertor(scheme *Scheme) runtime.ObjectConvertor
Types ¶
type Scheme ¶
type Scheme struct{}
func (*Scheme) Convert ¶
Convert reference from https://github.com/kubernetes/apiextensions-apiserver/blob/b0680ddb99b88a5978a43fe4f2508dce81be1ec9/pkg/apiserver/conversion/converter.go#L104
func (*Scheme) ConvertFieldLabel ¶
func (*Scheme) ConvertToVersion ¶
func (s *Scheme) ConvertToVersion(in runtime.Object, target runtime.GroupVersioner) (runtime.Object, error)
ConvertToVersion converts in object to the given gvk in place and returns the same `in` object. The in object can be a single object or a UnstructuredList. CRD storage implementation creates an UnstructuredList with the request's GV, populates it from storage, then calls conversion to convert the individual items. This function assumes it never gets a v1.List.
func (*Scheme) ObjectKinds ¶
func (s *Scheme) ObjectKinds(obj runtime.Object) (gvks []schema.GroupVersionKind, unversionedType bool, err error)
ObjectKinds returns a slice of one element with the group,version,kind of the provided object, or an error if the object is not runtime.Unstructured or has no group,version,kind information. unversionedType will always be false because runtime.Unstructured object should always have group,version,kind information set.
func (*Scheme) Recognizes ¶
func (s *Scheme) Recognizes(gvk schema.GroupVersionKind) bool
Recognizes does not delegate the Recognizes check, needs to be wrapped by the caller to check the specific gvk