Versions in this module Expand all Collapse all v0 v0.0.4 Aug 15, 2023 Changes in this version + var ContentTypes = map[string]serializer.ContentType + var ErrAlreadyExists = errors.New("resource already exists") + var ErrAmbiguousFind = errors.New("two or more results were aquired when one was expected") + var ErrNotFound = errors.New("resource not found") + var ErrNotTracked = fmt.Errorf("untracked object: %w", ErrNotFound) + func DecodePartialObjects(rc io.ReadCloser, scheme *kruntime.Scheme, allowMultiple bool, ...) ([]runtime.PartialObject, error) + type GenericMappedRawStorage struct + func (r *GenericMappedRawStorage) AddMapping(key ObjectKey, path string) + func (r *GenericMappedRawStorage) Checksum(key ObjectKey) (string, error) + func (r *GenericMappedRawStorage) ContentType(key ObjectKey) (ct serializer.ContentType) + func (r *GenericMappedRawStorage) Delete(key ObjectKey) (err error) + func (r *GenericMappedRawStorage) Exists(key ObjectKey) bool + func (r *GenericMappedRawStorage) GetKey(path string) (ObjectKey, error) + func (r *GenericMappedRawStorage) List(kind KindKey) ([]ObjectKey, error) + func (r *GenericMappedRawStorage) Read(key ObjectKey) ([]byte, error) + func (r *GenericMappedRawStorage) RemoveMapping(key ObjectKey) + func (r *GenericMappedRawStorage) SetMappings(m map[ObjectKey]string) + func (r *GenericMappedRawStorage) WatchDir() string + func (r *GenericMappedRawStorage) Write(key ObjectKey, content []byte) error + type GenericRawStorage struct + func (r *GenericRawStorage) Checksum(key ObjectKey) (string, error) + func (r *GenericRawStorage) ContentType(_ ObjectKey) serializer.ContentType + func (r *GenericRawStorage) Delete(key ObjectKey) error + func (r *GenericRawStorage) Exists(key ObjectKey) bool + func (r *GenericRawStorage) GetKey(p string) (ObjectKey, error) + func (r *GenericRawStorage) List(kind KindKey) ([]ObjectKey, error) + func (r *GenericRawStorage) Read(key ObjectKey) ([]byte, error) + func (r *GenericRawStorage) WatchDir() string + func (r *GenericRawStorage) Write(key ObjectKey, content []byte) error + type GenericStorage struct + func (s *GenericStorage) Checksum(key ObjectKey) (string, error) + func (s *GenericStorage) Close() error + func (s *GenericStorage) Count(kind KindKey) (uint64, error) + func (s *GenericStorage) Create(obj runtime.Object) error + func (s *GenericStorage) Delete(key ObjectKey) error + func (s *GenericStorage) Find(kind KindKey, opts ...filter.ListOption) (runtime.Object, error) + func (s *GenericStorage) Get(key ObjectKey) (runtime.Object, error) + func (s *GenericStorage) GetMeta(key ObjectKey) (runtime.PartialObject, error) + func (s *GenericStorage) List(kind KindKey, opts ...filter.ListOption) ([]runtime.Object, error) + func (s *GenericStorage) ListMeta(kind KindKey) (result []runtime.PartialObject, walkerr error) + func (s *GenericStorage) ObjectKeyFor(obj runtime.Object) (ObjectKey, error) + func (s *GenericStorage) Patch(key ObjectKey, patch []byte) error + func (s *GenericStorage) RawStorage() RawStorage + func (s *GenericStorage) Serializer() serializer.Serializer + func (s *GenericStorage) Update(obj runtime.Object) error + type KindKey interface + EqualsGVK func(kind KindKey, respectVersion bool) bool + GetGVK func() schema.GroupVersionKind + GetGroup func() string + GetKind func() string + GetVersion func() string + String func() string + func NewKindKey(gvk schema.GroupVersionKind) KindKey + type MappedRawStorage interface + AddMapping func(key ObjectKey, path string) + RemoveMapping func(key ObjectKey) + SetMappings func(m map[ObjectKey]string) + func NewGenericMappedRawStorage(dir string) MappedRawStorage + type ObjectKey interface + func NewObjectKey(kind KindKey, id runtime.Identifyable) ObjectKey + type RawStorage interface + Checksum func(key ObjectKey) (string, error) + ContentType func(key ObjectKey) serializer.ContentType + Delete func(key ObjectKey) error + Exists func(key ObjectKey) bool + GetKey func(path string) (ObjectKey, error) + List func(key KindKey) ([]ObjectKey, error) + Read func(key ObjectKey) ([]byte, error) + WatchDir func() string + Write func(key ObjectKey, content []byte) error + func NewGenericRawStorage(dir string, gv schema.GroupVersion, ct serializer.ContentType) RawStorage + type ReadStorage interface + Checksum func(key ObjectKey) (string, error) + Close func() error + Count func(kind KindKey) (uint64, error) + Find func(kind KindKey, opts ...filter.ListOption) (runtime.Object, error) + Get func(key ObjectKey) (runtime.Object, error) + GetMeta func(key ObjectKey) (runtime.PartialObject, error) + List func(kind KindKey, opts ...filter.ListOption) ([]runtime.Object, error) + ListMeta func(kind KindKey) ([]runtime.PartialObject, error) + ObjectKeyFor func(obj runtime.Object) (ObjectKey, error) + RawStorage func() RawStorage + Serializer func() serializer.Serializer + type Storage interface + func NewGenericStorage(rawStorage RawStorage, serializer serializer.Serializer, ...) Storage + type WriteStorage interface + Create func(obj runtime.Object) error + Delete func(key ObjectKey) error + Patch func(key ObjectKey, patch []byte) error + Update func(obj runtime.Object) error