Documentation ¶
Index ¶
- Constants
- func SplitCRDName(crdName string) (plural, group string, err error)
- type ConfigMapLoader
- type DirectoryLoader
- type SQLLoader
- type SQLPopulator
- type SQLQuerier
- func (s *SQLQuerier) GetBundle(ctx context.Context, pkgName, channelName, csvName string) (string, error)
- func (s *SQLQuerier) GetBundleForChannel(ctx context.Context, pkgName string, channelName string) (string, error)
- func (s *SQLQuerier) GetBundleThatProvides(ctx context.Context, group, version, kind string) (string, *registry.ChannelEntry, error)
- func (s *SQLQuerier) GetBundleThatReplaces(ctx context.Context, name, pkgName, channelName string) (string, error)
- func (s *SQLQuerier) GetChannelEntriesThatProvide(ctx context.Context, group, version, kind string) (entries []*registry.ChannelEntry, err error)
- func (s *SQLQuerier) GetChannelEntriesThatReplace(ctx context.Context, name string) (entries []*registry.ChannelEntry, err error)
- func (s *SQLQuerier) GetLatestChannelEntriesThatProvide(ctx context.Context, group, version, kind string) (entries []*registry.ChannelEntry, err error)
- func (s *SQLQuerier) GetPackage(ctx context.Context, name string) (*registry.PackageManifest, error)
- func (s *SQLQuerier) ListPackages(ctx context.Context) ([]string, error)
- func (s *SQLQuerier) ListTables(ctx context.Context) ([]string, error)
Constants ¶
const ( ConfigMapCRDName = "customResourceDefinitions" ConfigMapCSVName = "clusterServiceVersions" ConfigMapPackageName = "packages" )
Variables ¶
This section is empty.
Functions ¶
func SplitCRDName ¶
Types ¶
type ConfigMapLoader ¶
type ConfigMapLoader struct {
// contains filtered or unexported fields
}
ConfigMapLoader loads a configmap of resources into the database entries under "customResourceDefinitions" will be parsed as CRDs entries under "clusterServiceVersions" will be parsed as CSVs entries under "packages" will be parsed as Packages
func NewSQLLoaderForConfigMap ¶
func NewSQLLoaderForConfigMap(store registry.Load, configMap v1.ConfigMap) *ConfigMapLoader
func NewSQLLoaderForConfigMapData ¶
func NewSQLLoaderForConfigMapData(logger *logrus.Entry, store registry.Load, configMapData map[string]string) *ConfigMapLoader
NewSQLLoaderForConfigMapData is useful when the operator manifest(s) originate from a different source than a configMap. For example, operator manifest(s) can be downloaded from a remote registry like quay.io.
func (*ConfigMapLoader) Populate ¶
func (c *ConfigMapLoader) Populate() error
type DirectoryLoader ¶
type DirectoryLoader struct {
// contains filtered or unexported fields
}
DirectoryLoader loads a directory of resources into the database files ending in `.crd.yaml` will be parsed as CRDs files ending in `.clusterserviceversion.yaml` will be parsed as CSVs files ending in `.package.yaml` will be parsed as Packages
func NewSQLLoaderForDirectory ¶
func NewSQLLoaderForDirectory(store registry.Load, directory string) *DirectoryLoader
func (*DirectoryLoader) LoadBundle ¶
func (d *DirectoryLoader) LoadBundle(dir string) (*registry.Bundle, error)
LoadBundle takes the directory that a CSV is in and assumes the rest of the objects in that directory are part of the bundle.
func (*DirectoryLoader) LoadBundleWalkFunc ¶
LoadBundleWalkFunc walks the directory. When it sees a `.clusterserviceversion.yaml` file, it attempts to load the surrounding files in the same directory as a bundle, and stores them in the db for querying
func (*DirectoryLoader) LoadPackagesWalkFunc ¶
func (*DirectoryLoader) Populate ¶
func (d *DirectoryLoader) Populate() error
type SQLLoader ¶
type SQLLoader struct {
// contains filtered or unexported fields
}
func NewSQLLiteLoader ¶
func (*SQLLoader) AddOperatorBundle ¶
func (*SQLLoader) AddPackageChannels ¶
func (s *SQLLoader) AddPackageChannels(manifest registry.PackageManifest) error
func (*SQLLoader) AddProvidedAPIs ¶
type SQLPopulator ¶
type SQLPopulator interface {
Populate() error
}
type SQLQuerier ¶
type SQLQuerier struct {
// contains filtered or unexported fields
}
func NewSQLLiteQuerier ¶
func NewSQLLiteQuerier(dbFilename string) (*SQLQuerier, error)
func (*SQLQuerier) GetBundleForChannel ¶
func (*SQLQuerier) GetBundleThatProvides ¶
func (s *SQLQuerier) GetBundleThatProvides(ctx context.Context, group, version, kind string) (string, *registry.ChannelEntry, error)
Get the the latest bundle that provides the API in a default channel, error unless there is ONLY one
func (*SQLQuerier) GetBundleThatReplaces ¶
func (*SQLQuerier) GetChannelEntriesThatProvide ¶
func (s *SQLQuerier) GetChannelEntriesThatProvide(ctx context.Context, group, version, kind string) (entries []*registry.ChannelEntry, err error)
func (*SQLQuerier) GetChannelEntriesThatReplace ¶
func (s *SQLQuerier) GetChannelEntriesThatReplace(ctx context.Context, name string) (entries []*registry.ChannelEntry, err error)
func (*SQLQuerier) GetLatestChannelEntriesThatProvide ¶
func (s *SQLQuerier) GetLatestChannelEntriesThatProvide(ctx context.Context, group, version, kind string) (entries []*registry.ChannelEntry, err error)
Get latest channel entries that provide an api
func (*SQLQuerier) GetPackage ¶
func (s *SQLQuerier) GetPackage(ctx context.Context, name string) (*registry.PackageManifest, error)
func (*SQLQuerier) ListPackages ¶
func (s *SQLQuerier) ListPackages(ctx context.Context) ([]string, error)
ListPackages returns a list of package names as strings
func (*SQLQuerier) ListTables ¶
func (s *SQLQuerier) ListTables(ctx context.Context) ([]string, error)