Search Options

Results per page
Sort
Preferred Languages
Advance

Results 1 - 5 of 5 for ListMetaAccessor (0.24 sec)

  1. pkg/api/testing/meta_test.go

    					t.Errorf("%v (%v) does not implement runtime.Object", gv.WithKind(kind), knownType)
    				}
    				lm, isLM := obj.(meta.ListMetaAccessor)
    				om, isOM := obj.(metav1.ObjectMetaAccessor)
    				switch {
    				case isLM && isOM:
    					t.Errorf("%v (%v) implements ListMetaAccessor and ObjectMetaAccessor", gv.WithKind(kind), knownType)
    					continue
    				case isLM:
    					m := lm.GetListMeta()
    					if m == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Feb 14 10:11:56 UTC 2022
    - 3.1K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/meta/meta.go

    // not provide List.
    func CommonAccessor(obj interface{}) (metav1.Common, error) {
    	switch t := obj.(type) {
    	case List:
    		return t, nil
    	case ListMetaAccessor:
    		if m := t.GetListMeta(); m != nil {
    			return m, nil
    		}
    		return nil, errNotCommon
    	case metav1.ListMetaAccessor:
    		if m := t.GetListMeta(); m != nil {
    			return m, nil
    		}
    		return nil, errNotCommon
    	case metav1.Object:
    		return t, nil
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sat Jun 25 16:23:43 UTC 2022
    - 16.5K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/apis/meta/v1/meta.go

    	GetOwnerReferences() []OwnerReference
    	SetOwnerReferences([]OwnerReference)
    	GetManagedFields() []ManagedFieldsEntry
    	SetManagedFields(managedFields []ManagedFieldsEntry)
    }
    
    // ListMetaAccessor retrieves the list interface from an object
    type ListMetaAccessor interface {
    	GetListMeta() ListInterface
    }
    
    // Common lets you work with core metadata from any of the versioned or
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu May 05 20:12:50 UTC 2022
    - 7.7K bytes
    - Viewed (0)
  4. staging/src/k8s.io/apimachinery/pkg/api/meta/interfaces.go

    */
    
    package meta
    
    import (
    	metav1 "k8s.io/apimachinery/pkg/apis/meta/v1"
    	"k8s.io/apimachinery/pkg/runtime"
    	"k8s.io/apimachinery/pkg/runtime/schema"
    	"k8s.io/apimachinery/pkg/types"
    )
    
    type ListMetaAccessor interface {
    	GetListMeta() List
    }
    
    // List lets you work with list metadata from any of the versioned or
    // internal API objects. Attempting to set or retrieve a field on an object that does
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 05 23:44:02 UTC 2021
    - 5.5K bytes
    - Viewed (0)
  5. staging/src/k8s.io/cli-runtime/pkg/resource/result.go

    	}
    
    	return toV1List(objects, version), err
    }
    
    // Compile time check to enforce that list implements the necessary interface
    var _ metav1.ListInterface = &v1.List{}
    var _ metav1.ListMetaAccessor = &v1.List{}
    
    // toV1List takes a slice of Objects + their version, and returns
    // a v1.List Object containing the objects in the Items field
    func toV1List(objects []runtime.Object, version string) runtime.Object {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 23:00:24 UTC 2019
    - 7.3K bytes
    - Viewed (0)
Back to top