Documentation ¶
Index ¶
- func DefaultStoreDir() (string, error)
- type Filter
- type Item
- type Store
- func (s *Store) Add(ctx context.Context, item Item, contents io.Reader) (resErr error)
- func (s *Store) Has(item Item) (bool, error)
- func (s *Store) Initialize(ctx context.Context) error
- func (s *Store) List(ctx context.Context, matching Filter) ([]Item, error)
- func (s *Store) Path(item Item) (string, error)
- func (s *Store) Remove(ctx context.Context, matching Filter) ([]Item, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DefaultStoreDir ¶
DefaultStoreDir returns the default location for the store. It's dependent on operating system:
- Windows: %LocalAppData%\kubebuilder-envtest - OSX: ~/Library/Application Support/io.kubebuilder.envtest - Others: ${XDG_DATA_HOME:-~/.local/share}/kubebuilder-envtest
Otherwise, it errors out. Note that these paths must not be relied upon manually.
Types ¶
type Filter ¶
Filter is a version spec & platform selector (i.e. platform potentially with wildcards) to filter store items.
type Store ¶
type Store struct { // Root is the root FS that the store stores in. You'll probably // want to use a BasePathFS to scope it down to a particular directory. // // Note that if for some reason there are nested BasePathFSes, and they're // interrupted by a non-BasePathFS, Path won't work properly. Root afero.Fs }
Store knows how to list, load, store, and delete envtest tools.
func (*Store) Initialize ¶
Initialize ensures that the store is all set up on disk, etc.
func (*Store) List ¶
List lists all items matching the given filter.
Results are stored by version (newest first), and OS/arch (consistently, but no guaranteed ordering).