ResourceFor takes a partial resource and returns back the single match. It returns an error if there are multiple matches.
(input schema.GroupVersionResource)
| 253 | // ResourceFor takes a partial resource and returns back the single |
| 254 | // match. It returns an error if there are multiple matches. |
| 255 | func (d *DeferredDiscoveryRESTMapper) ResourceFor(input schema.GroupVersionResource) (gvr schema.GroupVersionResource, err error) { |
| 256 | del, err := d.getDelegate() |
| 257 | if err != nil { |
| 258 | return schema.GroupVersionResource{}, err |
| 259 | } |
| 260 | gvr, err = del.ResourceFor(input) |
| 261 | if err != nil && !d.cl.Fresh() { |
| 262 | d.Reset() |
| 263 | gvr, err = d.ResourceFor(input) |
| 264 | } |
| 265 | return |
| 266 | } |
| 267 | |
| 268 | // ResourcesFor takes a partial resource and returns back the list of |
| 269 | // potential resource in priority order. |
nothing calls this directly
no test coverage detected