kubernetes/staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go

var errNotList

var errNotCommon

// CommonAccessor returns a Common interface for the provided object or an error if the object does
// not provide List.
func CommonAccessor(obj interface{}

// ListAccessor returns a List interface for the provided object or an error if the object does
// not provide List.
// IMPORTANT: Objects are NOT a superset of lists. Do not use this check to determine whether an
// object *is* a List.
func ListAccessor(obj interface{}

var errNotObject

// Accessor takes an arbitrary object pointer and returns meta.Interface.
// obj must be a pointer to an API type. An error is returned if the minimum
// required fields are missing. Fields that are not required return the default
// value and are a no-op if set.
func Accessor(obj interface{}

// AsPartialObjectMetadata takes the metav1 interface and returns a partial object.
// TODO: consider making this solely a conversion action.
func AsPartialObjectMetadata(m metav1.Object) *metav1.PartialObjectMetadata {}

// TypeAccessor returns an interface that allows retrieving and modifying the APIVersion
// and Kind of an in-memory internal object.
// TODO: this interface is used to test code that does not have ObjectMeta or ListMeta
// in round tripping (objects which can use apiVersion/kind, but do not fit the Kube
// api conventions).
func TypeAccessor(obj interface{}

type objectAccessor

func (obj objectAccessor) GetKind() string {}

func (obj objectAccessor) SetKind(kind string) {}

func (obj objectAccessor) GetAPIVersion() string {}

func (obj objectAccessor) SetAPIVersion(version string) {}

// NewAccessor returns a MetadataAccessor that can retrieve
// or manipulate resource version on objects derived from core API
// metadata concepts.
func NewAccessor() MetadataAccessor {}

type resourceAccessor

func (resourceAccessor) Kind(obj runtime.Object) (string, error) {}

func (resourceAccessor) SetKind(obj runtime.Object, kind string) error {}

func (resourceAccessor) APIVersion(obj runtime.Object) (string, error) {}

func (resourceAccessor) SetAPIVersion(obj runtime.Object, version string) error {}

func (resourceAccessor) Namespace(obj runtime.Object) (string, error) {}

func (resourceAccessor) SetNamespace(obj runtime.Object, namespace string) error {}

func (resourceAccessor) Name(obj runtime.Object) (string, error) {}

func (resourceAccessor) SetName(obj runtime.Object, name string) error {}

func (resourceAccessor) GenerateName(obj runtime.Object) (string, error) {}

func (resourceAccessor) SetGenerateName(obj runtime.Object, name string) error {}

func (resourceAccessor) UID(obj runtime.Object) (types.UID, error) {}

func (resourceAccessor) SetUID(obj runtime.Object, uid types.UID) error {}

func (resourceAccessor) SelfLink(obj runtime.Object) (string, error) {}

func (resourceAccessor) SetSelfLink(obj runtime.Object, selfLink string) error {}

func (resourceAccessor) Labels(obj runtime.Object) (map[string]string, error) {}

func (resourceAccessor) SetLabels(obj runtime.Object, labels map[string]string) error {}

func (resourceAccessor) Annotations(obj runtime.Object) (map[string]string, error) {}

func (resourceAccessor) SetAnnotations(obj runtime.Object, annotations map[string]string) error {}

func (resourceAccessor) ResourceVersion(obj runtime.Object) (string, error) {}

func (resourceAccessor) SetResourceVersion(obj runtime.Object, version string) error {}

func (resourceAccessor) Continue(obj runtime.Object) (string, error) {}

func (resourceAccessor) SetContinue(obj runtime.Object, version string) error {}

// extractFromOwnerReference extracts v to o. v is the OwnerReferences field of an object.
func extractFromOwnerReference(v reflect.Value, o *metav1.OwnerReference) error {}

// setOwnerReference sets v to o. v is the OwnerReferences field of an object.
func setOwnerReference(v reflect.Value, o *metav1.OwnerReference) error {}

type genericAccessor

func (a genericAccessor) GetNamespace() string {}

func (a genericAccessor) SetNamespace(namespace string) {}

func (a genericAccessor) GetName() string {}

func (a genericAccessor) SetName(name string) {}

func (a genericAccessor) GetGenerateName() string {}

func (a genericAccessor) SetGenerateName(generateName string) {}

func (a genericAccessor) GetUID() types.UID {}

func (a genericAccessor) SetUID(uid types.UID) {}

func (a genericAccessor) GetAPIVersion() string {}

func (a genericAccessor) SetAPIVersion(version string) {}

func (a genericAccessor) GetKind() string {}

func (a genericAccessor) SetKind(kind string) {}

func (a genericAccessor) GetResourceVersion() string {}

func (a genericAccessor) SetResourceVersion(version string) {}

func (a genericAccessor) GetSelfLink() string {}

func (a genericAccessor) SetSelfLink(selfLink string) {}

func (a genericAccessor) GetCreationTimestamp() metav1.Time {}

func (a genericAccessor) SetCreationTimestamp(timestamp metav1.Time) {}

func (a genericAccessor) GetDeletionTimestamp() *metav1.Time {}

func (a genericAccessor) SetDeletionTimestamp(timestamp *metav1.Time) {}

func (a genericAccessor) GetLabels() map[string]string {}

func (a genericAccessor) SetLabels(labels map[string]string) {}

func (a genericAccessor) GetAnnotations() map[string]string {}

func (a genericAccessor) SetAnnotations(annotations map[string]string) {}

func (a genericAccessor) GetFinalizers() []string {}

func (a genericAccessor) SetFinalizers(finalizers []string) {}

func (a genericAccessor) GetOwnerReferences() []metav1.OwnerReference {}

func (a genericAccessor) SetOwnerReferences(references []metav1.OwnerReference) {}

// extractFromTypeMeta extracts pointers to version and kind fields from an object
func extractFromTypeMeta(v reflect.Value, a *genericAccessor) error {}