Search Options

Results per page
Sort
Preferred Languages
Advance

Results 11 - 20 of 35 for TestMapping (0.14 sec)

  1. staging/src/k8s.io/cli-runtime/pkg/resource/selector.go

    type Selector struct {
    	Client        RESTClient
    	Mapping       *meta.RESTMapping
    	Namespace     string
    	LabelSelector string
    	FieldSelector string
    	LimitChunks   int64
    }
    
    // NewSelector creates a resource selector which hides details of getting items by their label selector.
    func NewSelector(client RESTClient, mapping *meta.RESTMapping, namespace, labelSelector, fieldSelector string, limitChunks int64) *Selector {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Apr 12 15:08:01 UTC 2021
    - 2.8K bytes
    - Viewed (0)
  2. staging/src/k8s.io/apimachinery/pkg/api/meta/priority.go

    		return false
    	}
    	if pattern.Kind != AnyKind && pattern.Kind != kind.Kind {
    		return false
    	}
    
    	return true
    }
    
    func (m PriorityRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (mapping *RESTMapping, err error) {
    	mappings, originalErr := m.Delegate.RESTMappings(gk, versions...)
    	if originalErr != nil && len(mappings) == 0 {
    		return nil, originalErr
    	}
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Fri Nov 05 23:44:02 UTC 2021
    - 7.6K bytes
    - Viewed (0)
  3. staging/src/k8s.io/apimachinery/pkg/api/meta/restmapper_test.go

    	}
    
    	// mismatch of version
    	_, err = mapper.RESTMapping(internalObjectGK, expectedGroupVersion2.Version)
    	if err == nil {
    		t.Errorf("unexpected non-error")
    	}
    	_, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion1.Version)
    	if err == nil {
    		t.Errorf("unexpected non-error")
    	}
    
    	// not in the search versions
    	_, err = mapper.RESTMapping(otherObjectGK, expectedGroupVersion3.Version)
    	if err == nil {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Sun Nov 01 08:38:57 UTC 2020
    - 28.9K bytes
    - Viewed (0)
  4. istioctl/pkg/cli/kubectl_factory.go

    }
    
    func (f Factory) NewBuilder() *resource.Builder {
    	return f.full.NewBuilder()
    }
    
    func (f Factory) ClientForMapping(mapping *meta.RESTMapping) (resource.RESTClient, error) {
    	return f.full.ClientForMapping(mapping)
    }
    
    func (f Factory) UnstructuredClientForMapping(mapping *meta.RESTMapping) (resource.RESTClient, error) {
    	return f.full.UnstructuredClientForMapping(mapping)
    }
    
    Registered: Fri Jun 14 15:00:06 UTC 2024
    - Last Modified: Fri Jun 09 18:17:49 UTC 2023
    - 2K bytes
    - Viewed (0)
  5. staging/src/k8s.io/apimachinery/pkg/api/meta/restmapper.go

    // version should be used to access the named group/kind.
    func (m *DefaultRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*RESTMapping, error) {
    	mappings, err := m.RESTMappings(gk, versions...)
    	if err != nil {
    		return nil, err
    	}
    	if len(mappings) == 0 {
    		return nil, &NoKindMatchError{GroupKind: gk, SearchedVersions: versions}
    	}
    	// since we rely on RESTMappings method
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Nov 17 01:55:47 UTC 2021
    - 16.1K bytes
    - Viewed (0)
  6. staging/src/k8s.io/apiserver/pkg/admission/initializer/initializer_test.go

    	return nil, nil
    }
    func (doNothingRESTMapper) RESTMapping(gk schema.GroupKind, versions ...string) (*meta.RESTMapping, error) {
    	return nil, nil
    }
    func (doNothingRESTMapper) RESTMappings(gk schema.GroupKind, versions ...string) ([]*meta.RESTMapping, error) {
    	return nil, nil
    }
    func (doNothingRESTMapper) ResourceSingularizer(resource string) (singular string, err error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 06 00:00:21 UTC 2024
    - 8.2K bytes
    - Viewed (0)
  7. staging/src/k8s.io/cli-runtime/pkg/resource/mapper.go

    		ResourceVersion: resourceVersion,
    
    		Object: obj,
    	}
    
    	if m.localFn == nil || !m.localFn() {
    		restMapper, err := m.restMapperFn()
    		if err != nil {
    			return nil, err
    		}
    		mapping, err := restMapper.RESTMapping(gvk.GroupKind(), gvk.Version)
    		if err != nil {
    			if _, ok := err.(*meta.NoKindMatchError); ok {
    				return nil, fmt.Errorf("resource mapping not found for name: %q namespace: %q from %q: %w\nensure CRDs are installed first",
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Jan 03 10:53:18 UTC 2024
    - 4.8K bytes
    - Viewed (0)
  8. staging/src/k8s.io/cli-runtime/pkg/resource/result.go

    		Items: raw,
    	}
    }
    
    // ResourceMapping returns a single meta.RESTMapping representing the
    // resources located by the builder, or an error if more than one
    // mapping was found.
    func (r *Result) ResourceMapping() (*meta.RESTMapping, error) {
    	if r.err != nil {
    		return nil, r.err
    	}
    	mappings := map[schema.GroupVersionResource]*meta.RESTMapping{}
    	for i := range r.sources {
    		m, ok := r.sources[i].(ResourceMapping)
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Thu Mar 07 23:00:24 UTC 2019
    - 7.3K bytes
    - Viewed (0)
  9. staging/src/k8s.io/cli-runtime/pkg/resource/builder.go

    	return b
    }
    
    // mappingFor returns the RESTMapping for the Kind given, or the Kind referenced by the resource.
    // Prefers a fully specified GroupVersionResource match. If one is not found, we match on a fully
    // specified GroupVersionKind, or fallback to a match on GroupKind.
    func (b *Builder) mappingFor(resourceOrKindArg string) (*meta.RESTMapping, error) {
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Mon Jul 03 10:17:56 UTC 2023
    - 37.2K bytes
    - Viewed (0)
  10. pkg/controller/garbagecollector/operations.go

    func (gc *GarbageCollector) apiResource(apiVersion, kind string) (schema.GroupVersionResource, bool, error) {
    	fqKind := schema.FromAPIVersionAndKind(apiVersion, kind)
    	mapping, err := gc.restMapper.RESTMapping(fqKind.GroupKind(), fqKind.Version)
    	if err != nil {
    		return schema.GroupVersionResource{}, false, newRESTMappingError(kind, apiVersion)
    	}
    	return mapping.Resource, mapping.Scope == meta.RESTScopeNamespace, nil
    }
    
    Registered: Sat Jun 15 01:39:40 UTC 2024
    - Last Modified: Wed Mar 08 13:37:56 UTC 2023
    - 4.9K bytes
    - Viewed (0)
Back to top