Documentation ¶
Overview ¶
+k8s:deepcopy-gen=package
Index ¶
- type ClientImpl
- func (c *ClientImpl) Create(cr crd.CustomResource) (e error)
- func (c *ClientImpl) Delete(namespace string, name string) (e error)
- func (c *ClientImpl) Get(namespace string, name string) (result runtime.Object, e error)
- func (c *ClientImpl) List(namespace string, labels map[string]string) (result runtime.Object, e error)
- func (c *ClientImpl) RESTClient() rest.Interface
- func (c *ClientImpl) Update(cr crd.CustomResource) (result runtime.Object, e error)
- func (c *ClientImpl) Validate(cr crd.CustomResource) (e error)
- type CustomResourceImpl
- func (c *CustomResourceImpl) GetSpecState() states.State
- func (c *CustomResourceImpl) GetStatusState() states.State
- func (c *CustomResourceImpl) JSON() (string, error)
- func (c *CustomResourceImpl) Name() string
- func (c *CustomResourceImpl) Namespace() string
- func (c *CustomResourceImpl) SetStatusStateWithMessage(state states.State, message string)
- type CustomResourceListImpl
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClientImpl ¶
type ClientImpl struct { CustomResourceImpl *CustomResourceImpl CustomResourceListImpl *CustomResourceListImpl Error string }
ClientImpl is a fake implementation of crd.Client
func (*ClientImpl) Create ¶
func (c *ClientImpl) Create(cr crd.CustomResource) (e error)
Create creates the supplied CRD.
func (*ClientImpl) Delete ¶
func (c *ClientImpl) Delete(namespace string, name string) (e error)
Delete deletes the CRD from the Kubernetes API server.
func (*ClientImpl) RESTClient ¶
func (c *ClientImpl) RESTClient() rest.Interface
returns a fake RESTClient. TODO Not used in unit tests, returns nil
func (*ClientImpl) Update ¶
func (c *ClientImpl) Update(cr crd.CustomResource) (result runtime.Object, e error)
Update updates the CRD on the Kubernetes API server.
func (*ClientImpl) Validate ¶
func (c *ClientImpl) Validate(cr crd.CustomResource) (e error)
Validate validates a custom resource against a json schema. Returns nil if object adheres to the schema.
type CustomResourceImpl ¶
type CustomResourceImpl struct { metav1.TypeMeta `json:",inline"` metav1.ObjectMeta `json:"metadata"` SpecState states.State `json:"spec"` StatusState states.State `json:"status,omitempty"` }
+k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object CustomResourceImpl implements crd.CustomResource
func (*CustomResourceImpl) GetSpecState ¶
func (c *CustomResourceImpl) GetSpecState() states.State
GetSpecState returns spec.state
func (*CustomResourceImpl) GetStatusState ¶
func (c *CustomResourceImpl) GetStatusState() states.State
GetStatusState returns spec.status
func (*CustomResourceImpl) JSON ¶
func (c *CustomResourceImpl) JSON() (string, error)
JSON returns json representation
func (*CustomResourceImpl) Name ¶
func (c *CustomResourceImpl) Name() string
Name returns objectMeta.Name
func (*CustomResourceImpl) Namespace ¶
func (c *CustomResourceImpl) Namespace() string
Namespace returns objectMeta.Namespace
func (*CustomResourceImpl) SetStatusStateWithMessage ¶
func (c *CustomResourceImpl) SetStatusStateWithMessage(state states.State, message string)
SetStatusStateWithMessage TBD store message
type CustomResourceListImpl ¶
type CustomResourceListImpl struct { metav1.TypeMeta `json:",inline"` metav1.ListMeta `json:",inline"` Items []CustomResourceImpl `json:"items"` }
CustomResourceListImpl implements crd.CustomResource for the List method +k8s:deepcopy-gen:interfaces=k8s.io/apimachinery/pkg/runtime.Object
func (*CustomResourceListImpl) GetItems ¶
func (c *CustomResourceListImpl) GetItems() []runtime.Object