forked from kubernetes-sigs/kubebuilder-declarative-pattern
/
cache.go
41 lines (31 loc) · 1.11 KB
/
cache.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
package mocks
import (
"context"
"k8s.io/apimachinery/pkg/api/errors"
"k8s.io/apimachinery/pkg/runtime/schema"
toolscache "sigs.k8s.io/controller-runtime/pkg/cache"
"sigs.k8s.io/controller-runtime/pkg/client"
)
type FakeCache struct {
}
func (FakeCache) Get(ctx context.Context, key client.ObjectKey, obj client.Object, opts ...client.GetOption) error {
return errors.NewNotFound(schema.GroupResource{}, "")
}
func (FakeCache) List(ctx context.Context, list client.ObjectList, opts ...client.ListOption) error {
panic("implement me")
}
func (FakeCache) GetInformer(ctx context.Context, obj client.Object) (toolscache.Informer, error) {
panic("implement me")
}
func (FakeCache) GetInformerForKind(gctx context.Context, vk schema.GroupVersionKind) (toolscache.Informer, error) {
panic("implement me")
}
func (FakeCache) Start(ctx context.Context) error {
panic("implement me")
}
func (FakeCache) WaitForCacheSync(ctx context.Context) bool {
panic("implement me")
}
func (FakeCache) IndexField(ctx context.Context, obj client.Object, field string, extractValue client.IndexerFunc) error {
panic("implement me")
}