Documentation ¶
Index ¶
- type KubectlOutput
- type MockKubectlCmd
- func (k *MockKubectlCmd) ApplyResource(ctx context.Context, obj *unstructured.Unstructured, ...) (string, error)
- func (k *MockKubectlCmd) ConvertToVersion(obj *unstructured.Unstructured, group, version string) (*unstructured.Unstructured, error)
- func (k *MockKubectlCmd) CreateResource(ctx context.Context, obj *unstructured.Unstructured, ...) (string, error)
- func (k *MockKubectlCmd) DeleteResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, ...) error
- func (k *MockKubectlCmd) GetAPIResources(config *rest.Config, preferred bool, resourceFilter kube.ResourceFilter) ([]kube.APIResourceInfo, error)
- func (k *MockKubectlCmd) GetLastResourceCommand(key kube.ResourceKey) string
- func (k *MockKubectlCmd) GetLastServerSideApply() bool
- func (k *MockKubectlCmd) GetLastValidate() bool
- func (k *MockKubectlCmd) GetResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, ...) (*unstructured.Unstructured, error)
- func (k *MockKubectlCmd) GetServerVersion(config *rest.Config) (string, error)
- func (k *MockKubectlCmd) LoadOpenAPISchema(config *rest.Config) (openapi.Resources, *managedfields.GvkParser, error)
- func (k *MockKubectlCmd) ManageResources(config *rest.Config, openAPISchema openapi.Resources) (kube.ResourceOperations, func(), error)
- func (k *MockKubectlCmd) NewDynamicClient(config *rest.Config) (dynamic.Interface, error)
- func (k *MockKubectlCmd) PatchResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, ...) (*unstructured.Unstructured, error)
- func (k *MockKubectlCmd) ReplaceResource(ctx context.Context, obj *unstructured.Unstructured, ...) (string, error)
- func (k *MockKubectlCmd) SetLastResourceCommand(key kube.ResourceKey, cmd string)
- func (k *MockKubectlCmd) SetLastServerSideApply(serverSideApply bool)
- func (k *MockKubectlCmd) SetLastValidate(validate bool)
- func (k *MockKubectlCmd) SetOnKubectlRun(onKubectlRun kube.OnKubectlRunFunc)
- func (k *MockKubectlCmd) UpdateResource(ctx context.Context, obj *unstructured.Unstructured, ...) (*unstructured.Unstructured, error)
- func (k *MockKubectlCmd) WithConvertToVersionFunc(...) *MockKubectlCmd
- func (k *MockKubectlCmd) WithGetResourceFunc(...) *MockKubectlCmd
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type KubectlOutput ¶
type MockKubectlCmd ¶
type MockKubectlCmd struct { APIResources []kube.APIResourceInfo Commands map[string]KubectlOutput Events chan watch.Event Version string DynamicClient dynamic.Interface // contains filtered or unexported fields }
func (*MockKubectlCmd) ApplyResource ¶
func (k *MockKubectlCmd) ApplyResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, force, validate, serverSideApply bool) (string, error)
func (*MockKubectlCmd) ConvertToVersion ¶
func (k *MockKubectlCmd) ConvertToVersion(obj *unstructured.Unstructured, group, version string) (*unstructured.Unstructured, error)
ConvertToVersion converts an unstructured object into the specified group/version
func (*MockKubectlCmd) CreateResource ¶ added in v0.3.0
func (k *MockKubectlCmd) CreateResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, validate bool) (string, error)
func (*MockKubectlCmd) DeleteResource ¶
func (k *MockKubectlCmd) DeleteResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, name string, namespace string, deleteOptions metav1.DeleteOptions) error
func (*MockKubectlCmd) GetAPIResources ¶
func (k *MockKubectlCmd) GetAPIResources(config *rest.Config, preferred bool, resourceFilter kube.ResourceFilter) ([]kube.APIResourceInfo, error)
func (*MockKubectlCmd) GetLastResourceCommand ¶ added in v0.3.0
func (k *MockKubectlCmd) GetLastResourceCommand(key kube.ResourceKey) string
func (*MockKubectlCmd) GetLastServerSideApply ¶ added in v0.7.0
func (k *MockKubectlCmd) GetLastServerSideApply() bool
func (*MockKubectlCmd) GetLastValidate ¶ added in v0.1.2
func (k *MockKubectlCmd) GetLastValidate() bool
func (*MockKubectlCmd) GetResource ¶
func (k *MockKubectlCmd) GetResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, name string, namespace string) (*unstructured.Unstructured, error)
func (*MockKubectlCmd) GetServerVersion ¶
func (k *MockKubectlCmd) GetServerVersion(config *rest.Config) (string, error)
func (*MockKubectlCmd) LoadOpenAPISchema ¶ added in v0.4.0
func (k *MockKubectlCmd) LoadOpenAPISchema(config *rest.Config) (openapi.Resources, *managedfields.GvkParser, error)
func (*MockKubectlCmd) ManageResources ¶ added in v0.4.0
func (k *MockKubectlCmd) ManageResources(config *rest.Config, openAPISchema openapi.Resources) (kube.ResourceOperations, func(), error)
func (*MockKubectlCmd) NewDynamicClient ¶
func (*MockKubectlCmd) PatchResource ¶
func (k *MockKubectlCmd) PatchResource(ctx context.Context, config *rest.Config, gvk schema.GroupVersionKind, name string, namespace string, patchType types.PatchType, patchBytes []byte, subresources ...string) (*unstructured.Unstructured, error)
func (*MockKubectlCmd) ReplaceResource ¶ added in v0.3.0
func (k *MockKubectlCmd) ReplaceResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy, force bool) (string, error)
func (*MockKubectlCmd) SetLastResourceCommand ¶ added in v0.3.0
func (k *MockKubectlCmd) SetLastResourceCommand(key kube.ResourceKey, cmd string)
func (*MockKubectlCmd) SetLastServerSideApply ¶ added in v0.7.0
func (k *MockKubectlCmd) SetLastServerSideApply(serverSideApply bool)
func (*MockKubectlCmd) SetLastValidate ¶ added in v0.1.2
func (k *MockKubectlCmd) SetLastValidate(validate bool)
func (*MockKubectlCmd) SetOnKubectlRun ¶
func (k *MockKubectlCmd) SetOnKubectlRun(onKubectlRun kube.OnKubectlRunFunc)
func (*MockKubectlCmd) UpdateResource ¶ added in v0.3.1
func (k *MockKubectlCmd) UpdateResource(ctx context.Context, obj *unstructured.Unstructured, dryRunStrategy cmdutil.DryRunStrategy) (*unstructured.Unstructured, error)
func (*MockKubectlCmd) WithConvertToVersionFunc ¶ added in v0.7.0
func (k *MockKubectlCmd) WithConvertToVersionFunc(convertToVersionFunc func(*unstructured.Unstructured, string, string) (*unstructured.Unstructured, error)) *MockKubectlCmd
WithConvertToVersionFunc overrides the default ConvertToVersion behavior.
func (*MockKubectlCmd) WithGetResourceFunc ¶ added in v0.7.0
func (k *MockKubectlCmd) WithGetResourceFunc(getResourcefunc func(context.Context, *rest.Config, schema.GroupVersionKind, string, string) (*unstructured.Unstructured, error)) *MockKubectlCmd
WithGetResourceFunc overrides the default ConvertToVersion behavior.
Click to show internal directories.
Click to hide internal directories.