FakeStore lets you define custom functions for store operations
| 18 | |
| 19 | // FakeStore lets you define custom functions for store operations |
| 20 | type FakeCustomStore struct { |
| 21 | AddFunc func(obj interface{}) error |
| 22 | UpdateFunc func(obj interface{}) error |
| 23 | DeleteFunc func(obj interface{}) error |
| 24 | ListFunc func() []interface{} |
| 25 | ListKeysFunc func() []string |
| 26 | GetFunc func(obj interface{}) (item interface{}, exists bool, err error) |
| 27 | GetByKeyFunc func(key string) (item interface{}, exists bool, err error) |
| 28 | ReplaceFunc func(list []interface{}, resourceVerion string) error |
| 29 | ResyncFunc func() error |
| 30 | } |
| 31 | |
| 32 | // Add calls the custom Add function if defined |
| 33 | func (f *FakeCustomStore) Add(obj interface{}) error { |
nothing calls this directly
no outgoing calls
no test coverage detected