move category expansion out of restmapper

This commit is contained in:
deads2k
2017-03-24 08:02:10 -04:00
parent f4986235c7
commit 8895f314b4
51 changed files with 298 additions and 245 deletions

View File

@@ -189,6 +189,8 @@ type ObjectMappingFactory interface {
// Returns interfaces for dealing with arbitrary
// runtime.Unstructured. This performs API calls to discover types.
UnstructuredObject() (meta.RESTMapper, runtime.ObjectTyper, error)
// Returns interface for expanding categories like `all`.
CategoryExpander() resource.CategoryExpander
// Returns a RESTClient for working with the specified RESTMapping or an error. This is intended
// for working with arbitrary resources and is not guaranteed to point to a Kubernetes APIServer.
ClientForMapping(mapping *meta.RESTMapping) (resource.RESTClient, error)