catalog

package
v0.2.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2021 License: Apache-2.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Catalog

type Catalog struct {
	// contains filtered or unexported fields
}

Catalog provides an in-memory cache of profiles from the cluster which can be queried easily. type Catalog map[string][]profilesv1.ProfileCatalogEntry

func New

func New() *Catalog

New creates a new, empty catalog.

func (*Catalog) AddOrReplace added in v0.0.12

func (c *Catalog) AddOrReplace(sourceName string, profiles ...profilesv1.ProfileCatalogEntry)

AddOrReplace replaces the catalog by replacing existing profiles with new profiles if it exists otherwise it creates it

func (*Catalog) Append added in v0.0.12

func (c *Catalog) Append(sourceName string, profiles ...profilesv1.ProfileCatalogEntry)

Append the existing profiles with new profiles

func (*Catalog) CatalogExists added in v0.0.12

func (c *Catalog) CatalogExists(sourceName string) bool

CatalogExists checks if the catalog exists

func (*Catalog) Get

func (c *Catalog) Get(sourceName, profileName string) *profilesv1.ProfileCatalogEntry

Get returns the profile description `profileName`.

func (*Catalog) GetWithVersion added in v0.0.2

func (c *Catalog) GetWithVersion(logger logr.Logger, sourceName, profileName, profileVersion string) *profilesv1.ProfileCatalogEntry

GetWithVersion returns the profile description `profileName` with the given version.

func (*Catalog) ProfilesGreaterThanVersion added in v0.0.4

func (c *Catalog) ProfilesGreaterThanVersion(logger logr.Logger, sourceName, profileName, profileVersion string) []profilesv1.ProfileCatalogEntry

ProfilesGreaterThanVersion returns all profiles which are of a greater version for a given profile with a version. If set to "latest" all versions are returned. Versions are ordered in descending order

func (*Catalog) Remove

func (c *Catalog) Remove(sourceName string)

Remove removes the specified catalog.

func (*Catalog) Search

func (c *Catalog) Search(name string) []profilesv1.ProfileCatalogEntry

Search returns profile descriptions that contain `name` in their names.

func (*Catalog) SearchAll added in v0.0.9

func (c *Catalog) SearchAll() []profilesv1.ProfileCatalogEntry

SearchAll returns `all` profile descriptions.

Jump to

Keyboard shortcuts

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