Versions in this module Expand all Collapse all v0 v0.0.2 Jul 15, 2024 v0.0.1 Jul 12, 2024 Changes in this version + const ErrAlreadyExists + const ErrInvalidObj + const ErrNotFound + const ErrTimeout + func IsExist(err error) bool + func IsInvalidObj(err error) bool + func IsNotFound(err error) bool + func IsRequestTimeout(err error) bool + type Config struct + Codec runtime.Codec + GroupResource schema.GroupResource + NewFunc func() runtime.Object + Prefix string + type Key struct + func KeyFromNSN(nsn types.NamespacedName) Key + func ToKey(name string) Key + func (r Key) String() string + type StorageError struct + AdditionalErrorMsg string + Code int + Key string + func NewAlreadyExistsError(key string) *StorageError + func NewInvalidObjError(key, msg string) *StorageError + func NewNotFoundError(key string) *StorageError + func (r *StorageError) Error() string + type Storer interface + Create func(ctx context.Context, key Key, data T1) error + Delete func(ctx context.Context, key Key) error + Get func(ctx context.Context, key Key) (T1, error) + List func(ctx context.Context, visitorFunc func(context.Context, Key, T1)) error + Update func(ctx context.Context, key Key, data T1) error + UpdateWithFn func(ctx context.Context, updateFunc func(ctx context.Context, key Key, obj T1) T1) error + UpdateWithKeyFn func(ctx context.Context, key Key, updateFunc func(ctx context.Context, obj T1) T1) error