Documentation ¶
Overview ¶
Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Copyright (C) 2019-2024 vdaas.org vald team <vald@vdaas.org>
Licensed under the Apache License, Version 2.0 (the "License"); You may not use this file except in compliance with the License. You may obtain a copy of the License at
https://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software distributed under the License is distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. See the License for the specific language governing permissions and limitations under the License.
Index ¶
- func NewDefaultManagerMock() manager.Manager
- type ClientMock
- func (cm *ClientMock) Create(ctx context.Context, obj client.Object, opts ...client.CreateOption) error
- func (cm *ClientMock) Delete(ctx context.Context, obj client.Object, opts ...client.DeleteOption) error
- func (cm *ClientMock) DeleteAllOf(ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption) error
- func (cm *ClientMock) Get(ctx context.Context, objKey client.ObjectKey, obj client.Object, ...) error
- func (cm *ClientMock) Status() client.SubResourceWriter
- type ControllerMock
- type ManagerMock
- type PatcherMock
- type SubResourceWriterMock
- type ValdK8sClientMock
- func (m *ValdK8sClientMock) Create(ctx context.Context, obj k8s.Object, opts ...k8s.CreateOption) error
- func (m *ValdK8sClientMock) Delete(ctx context.Context, obj k8s.Object, opts ...crclient.DeleteOption) error
- func (m *ValdK8sClientMock) Get(ctx context.Context, name, namespace string, obj k8s.Object, ...) error
- func (m *ValdK8sClientMock) LabelSelector(key string, op selection.Operator, vals []string) (labels.Selector, error)
- func (m *ValdK8sClientMock) List(ctx context.Context, list crclient.ObjectList, opts ...k8s.ListOption) error
- func (m *ValdK8sClientMock) MatchingLabels(labels map[string]string) k8s.MatchingLabels
- func (m *ValdK8sClientMock) Patch(ctx context.Context, obj k8s.Object, patch crclient.Patch, ...) error
- func (m *ValdK8sClientMock) Update(ctx context.Context, obj k8s.Object, opts ...crclient.UpdateOption) error
- func (m *ValdK8sClientMock) Watch(ctx context.Context, obj crclient.ObjectList, opts ...k8s.ListOption) (watch.Interface, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func NewDefaultManagerMock ¶
NewDefaultManagerMock returns default empty mock object.
Types ¶
type ClientMock ¶
type ClientMock struct { client.Client StatusFunc func() client.SubResourceWriter GetFunc func(context.Context, client.ObjectKey, client.Object, ...client.GetOption) error CreateFunc func(context.Context, client.Object, ...client.CreateOption) error DeleteFunc func(context.Context, client.Object, ...client.DeleteOption) error DeleteAllOfFunc func(context.Context, client.Object, ...client.DeleteAllOfOption) error }
func (*ClientMock) Create ¶
func (cm *ClientMock) Create( ctx context.Context, obj client.Object, opts ...client.CreateOption, ) error
func (*ClientMock) Delete ¶
func (cm *ClientMock) Delete( ctx context.Context, obj client.Object, opts ...client.DeleteOption, ) error
func (*ClientMock) DeleteAllOf ¶
func (cm *ClientMock) DeleteAllOf( ctx context.Context, obj client.Object, opts ...client.DeleteAllOfOption, ) error
func (*ClientMock) Status ¶
func (cm *ClientMock) Status() client.SubResourceWriter
type ControllerMock ¶
type ControllerMock struct { StartFunc func(ctx context.Context) (<-chan error, error) GetManagerFunc func() k8s.Manager }
func (*ControllerMock) GetManager ¶
func (m *ControllerMock) GetManager() k8s.Manager
type ManagerMock ¶
func (*ManagerMock) GetClient ¶
func (mm *ManagerMock) GetClient() client.Client
type PatcherMock ¶ added in v1.7.13
func (*PatcherMock) ApplyPodAnnotations ¶ added in v1.7.13
type SubResourceWriterMock ¶
type SubResourceWriterMock struct { client.SubResourceWriter UpdateFunc func(context.Context, client.Object, ...client.SubResourceUpdateOption) error }
func (*SubResourceWriterMock) Update ¶
func (sm *SubResourceWriterMock) Update( ctx context.Context, obj client.Object, opts ...client.SubResourceUpdateOption, ) error
type ValdK8sClientMock ¶ added in v1.7.12
func (*ValdK8sClientMock) Create ¶ added in v1.7.12
func (m *ValdK8sClientMock) Create( ctx context.Context, obj k8s.Object, opts ...k8s.CreateOption, ) error
func (*ValdK8sClientMock) Delete ¶ added in v1.7.12
func (m *ValdK8sClientMock) Delete( ctx context.Context, obj k8s.Object, opts ...crclient.DeleteOption, ) error
func (*ValdK8sClientMock) LabelSelector ¶ added in v1.7.12
func (*ValdK8sClientMock) List ¶ added in v1.7.12
func (m *ValdK8sClientMock) List( ctx context.Context, list crclient.ObjectList, opts ...k8s.ListOption, ) error
func (*ValdK8sClientMock) MatchingLabels ¶ added in v1.7.13
func (m *ValdK8sClientMock) MatchingLabels(labels map[string]string) k8s.MatchingLabels
func (*ValdK8sClientMock) Patch ¶ added in v1.7.12
func (m *ValdK8sClientMock) Patch( ctx context.Context, obj k8s.Object, patch crclient.Patch, opts ...crclient.PatchOption, ) error
func (*ValdK8sClientMock) Update ¶ added in v1.7.12
func (m *ValdK8sClientMock) Update( ctx context.Context, obj k8s.Object, opts ...crclient.UpdateOption, ) error
func (*ValdK8sClientMock) Watch ¶ added in v1.7.12
func (m *ValdK8sClientMock) Watch( ctx context.Context, obj crclient.ObjectList, opts ...k8s.ListOption, ) (watch.Interface, error)