Documentation
¶
Overview ¶
fake package provide a fake implementation of an inventory Store for using during tests.
Index ¶
- type Inventory
- func (i *Inventory) Delete(_ context.Context, _ bool) error
- func (i *Inventory) Diff(ctx context.Context, objects []*unstructured.Unstructured) (sets.Set[resource.ObjectMetadata], error)
- func (i *Inventory) Load(_ context.Context) (sets.Set[resource.ObjectMetadata], error)
- func (i *Inventory) Save(ctx context.Context, dryRun bool) error
- func (i *Inventory) SetObjects(_ sets.Set[*unstructured.Unstructured])
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Inventory ¶
type Inventory struct { InventoryObjects []*unstructured.Unstructured SaveFunc func(context.Context, bool) error // LoadErr will be returned when a load request is supposed to be made LoadErr error // SaveErr will be returned when a save request is supposed to be made SaveErr error // DeleteErr will be returned when a delete request is supposed to be made DeleteErr error }
func (*Inventory) Diff ¶
func (i *Inventory) Diff(ctx context.Context, objects []*unstructured.Unstructured) (sets.Set[resource.ObjectMetadata], error)
Diff implement Store interface
func (*Inventory) SetObjects ¶
func (i *Inventory) SetObjects(_ sets.Set[*unstructured.Unstructured])
SetObejcts implement Store interface
Click to show internal directories.
Click to hide internal directories.