Documentation ¶
Index ¶
- type APIHelper
- func (a *APIHelper) CreateObject(obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
- func (a *APIHelper) Name(obj *unstructured.Unstructured) (string, error)
- func (a *APIHelper) Namespace(obj *unstructured.Unstructured) (string, error)
- func (a *APIHelper) ResourceVersion(obj *unstructured.Unstructured) (string, error)
- type MetadataAccessor
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type APIHelper ¶
type APIHelper struct { Client dynamic.Interface DiscoveryClient discovery.DiscoveryInterface Mapper mapper Accessor MetadataAccessor }
APIHelper wraps the client-go dynamic client and exposes a simple interface.
func NewAPIHelper ¶
func NewAPIHelper(dyn dynamic.Interface, mapper mapper, accessor MetadataAccessor) (*APIHelper, error)
NewAPIHelper returns an APIHelper with the internals instantiated.
func NewAPIHelperFromRESTConfig ¶
NewAPIHelperFromRESTConfig creates a new APIHelper with default objects from client-go.
func (*APIHelper) CreateObject ¶
func (a *APIHelper) CreateObject(obj *unstructured.Unstructured) (*unstructured.Unstructured, error)
CreateObject attempts to create any kubernetes object.
func (*APIHelper) Name ¶
func (a *APIHelper) Name(obj *unstructured.Unstructured) (string, error)
Name returns the name of the kubernetes object.
func (*APIHelper) Namespace ¶
func (a *APIHelper) Namespace(obj *unstructured.Unstructured) (string, error)
Namespace returns the namespace of the kubernetes object.
func (*APIHelper) ResourceVersion ¶
func (a *APIHelper) ResourceVersion(obj *unstructured.Unstructured) (string, error)
ResourceVersion returns the resource version of a kubernetes object.
Click to show internal directories.
Click to hide internal directories.