fake

package
v0.4.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 24, 2024 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

fake package provide a fake implementation of an inventory Store for using during tests.

Index

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) Delete

func (i *Inventory) Delete(_ context.Context, _ bool) error

Delete implement Store interface

func (*Inventory) Diff

Diff implement Store interface

func (*Inventory) Load

Load implement Store interface

func (*Inventory) Save

func (i *Inventory) Save(ctx context.Context, dryRun bool) error

Save implement Store interface

func (*Inventory) SetObjects

func (i *Inventory) SetObjects(_ sets.Set[*unstructured.Unstructured])

SetObejcts implement Store interface

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL