Documentation
¶
Index ¶
- type FakeCRD
- type FakeSet
- func (f *FakeSet) APIExtensionsV1() apiextensionsv1.ApiextensionsV1Interface
- func (f *FakeSet) CRD(cfg client.CRDWrapperConfig) client.CRDInterface
- func (f *FakeSet) Dynamic() dynamic.Interface
- func (f *FakeSet) HTTPClient() *http.Client
- func (f *FakeSet) Kubernetes() kubernetes.Interface
- func (f *FakeSet) RESTConfig() *rest.Config
- func (f *FakeSet) RESTMapper() meta.RESTMapper
- func (f *FakeSet) SetRESTMapper(restMapper meta.RESTMapper)
- func (f *FakeSet) WithImpersonation(user string) (client.SetInterface, error)
- type JSONSafeDynamicClient
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type FakeCRD ¶
type FakeCRD struct{}
FakeCRD is a fake implementation of CRDInterface for testing
type FakeSet ¶
type FakeSet struct {
DynamicClient dynamic.Interface
KubernetesClient kubernetes.Interface
ApiExtensionsClient apiextensionsv1.ApiextensionsV1Interface
Config *rest.Config
HTTP *http.Client
// contains filtered or unexported fields
}
FakeSet is a fake implementation of SetInterface for testing
func NewFakeSet ¶
NewFakeSet creates a new FakeSet with the given clients
func (*FakeSet) APIExtensionsV1 ¶
func (f *FakeSet) APIExtensionsV1() apiextensionsv1.ApiextensionsV1Interface
APIExtensionsV1 returns the API extensions client
func (*FakeSet) CRD ¶
func (f *FakeSet) CRD(cfg client.CRDWrapperConfig) client.CRDInterface
CRD returns a new CRD interface instance
func (*FakeSet) HTTPClient ¶
func (*FakeSet) Kubernetes ¶
func (f *FakeSet) Kubernetes() kubernetes.Interface
Kubernetes returns the standard Kubernetes clientset
func (*FakeSet) RESTConfig ¶
RESTConfig returns a copy of the underlying REST config
func (*FakeSet) RESTMapper ¶
func (f *FakeSet) RESTMapper() meta.RESTMapper
func (*FakeSet) SetRESTMapper ¶
func (f *FakeSet) SetRESTMapper(restMapper meta.RESTMapper)
func (*FakeSet) WithImpersonation ¶
func (f *FakeSet) WithImpersonation(user string) (client.SetInterface, error)
WithImpersonation returns a new client that impersonates the given user For testing, this just returns the same fake client
type JSONSafeDynamicClient ¶
type JSONSafeDynamicClient struct {
// contains filtered or unexported fields
}
JSONSafeDynamicClient wraps a fake dynamic client and performs JSON marshal/unmarshal to sanitize data before passing it to the underlying client, preventing deep copy issues with pointer fields
func NewJSONSafeDynamicClient ¶
func NewJSONSafeDynamicClient(client dynamic.Interface) *JSONSafeDynamicClient
NewJSONSafeDynamicClient creates a new JSON-safe wrapper around a dynamic client
func (*JSONSafeDynamicClient) Resource ¶
func (j *JSONSafeDynamicClient) Resource(resource schema.GroupVersionResource) dynamic.NamespaceableResourceInterface
Resource returns a resource interface for the given resource