Documentation ¶
Index ¶
- Variables
- func DefaultYAMLDecoder() runtime.Decoder
- type APIKey
- type Bundle
- func (b *Bundle) Add(obj *unstructured.Unstructured)
- func (b *Bundle) AllProvidedAPIsInBundle() error
- func (b *Bundle) ClusterServiceVersion() (*v1alpha1.ClusterServiceVersion, error)
- func (b *Bundle) CustomResourceDefinitions() ([]*apiextensions.CustomResourceDefinition, error)
- func (b *Bundle) ProvidedAPIs() (map[APIKey]struct{}, error)
- func (b *Bundle) RequiredAPIs() (map[APIKey]struct{}, error)
- func (b *Bundle) Serialize() (csvName string, csvBytes []byte, bundleBytes []byte, err error)
- func (b *Bundle) Size() int
- type ChannelEntry
- type Load
- type PackageChannel
- type PackageManifest
- type Query
Constants ¶
This section is empty.
Variables ¶
var Codecs = serializer.NewCodecFactory(Scheme)
Codecs provides access to encoding and decoding for the scheme
var Scheme = runtime.NewScheme()
Scheme is the default instance of runtime.Scheme to which types in the Kubernetes API are already registered.
Functions ¶
func DefaultYAMLDecoder ¶
Types ¶
type Bundle ¶
type Bundle struct { Name string Objects []*unstructured.Unstructured Package string Channel string // contains filtered or unexported fields }
func NewBundle ¶
func NewBundle(name, pkgName, channelName string, objs ...*unstructured.Unstructured) *Bundle
func NewBundleFromStrings ¶
func (*Bundle) Add ¶
func (b *Bundle) Add(obj *unstructured.Unstructured)
func (*Bundle) AllProvidedAPIsInBundle ¶
func (*Bundle) ClusterServiceVersion ¶
func (b *Bundle) ClusterServiceVersion() (*v1alpha1.ClusterServiceVersion, error)
func (*Bundle) CustomResourceDefinitions ¶
func (b *Bundle) CustomResourceDefinitions() ([]*apiextensions.CustomResourceDefinition, error)
func (*Bundle) ProvidedAPIs ¶
func (*Bundle) RequiredAPIs ¶
type ChannelEntry ¶
type ChannelEntry struct { PackageName string ChannelName string BundleName string Replaces string }
ChannelEntry is a denormalized node in a channel graph
type Load ¶
type Load interface { AddOperatorBundle(bundle *Bundle) error AddPackageChannels(manifest PackageManifest) error AddProvidedAPIs() error }
type PackageChannel ¶
type PackageChannel struct { // Name is the name of the channel, e.g. `alpha` or `stable` Name string `json:"name"` // CurrentCSVName defines a reference to the CSV holding the version of this package currently // for the channel. CurrentCSVName string `json:"currentCSV"` }
PackageChannel defines a single channel under a package, pointing to a version of that package.
func (PackageChannel) IsDefaultChannel ¶
func (pc PackageChannel) IsDefaultChannel(pm PackageManifest) bool
IsDefaultChannel returns true if the PackageChennel is the default for the PackageManifest
type PackageManifest ¶
type PackageManifest struct { // PackageName is the name of the overall package, ala `etcd`. PackageName string `json:"packageName"` // Channels are the declared channels for the package, ala `stable` or `alpha`. Channels []PackageChannel `json:"channels"` // DefaultChannelName is, if specified, the name of the default channel for the package. The // default channel will be installed if no other channel is explicitly given. If the package // has a single channel, then that channel is implicitly the default. DefaultChannelName string `json:"defaultChannel"` }
PackageManifest holds information about a package, which is a reference to one (or more) channels under a single package.
func (PackageManifest) GetDefaultChannel ¶
func (m PackageManifest) GetDefaultChannel() string
GetDefaultChannel gets the default channel or returns the only one if there's only one. returns empty string if it can't determine the default
type Query ¶
type Query interface { ListTables(ctx context.Context) ([]string, error) ListPackages(ctx context.Context) ([]string, error) GetPackage(ctx context.Context, name string) (*PackageManifest, error) GetBundle(ctx context.Context, pkgName, channelName, csvName string) (string, error) GetBundleForChannel(ctx context.Context, pkgName string, channelName string) (string, error) // Get all channel entries that say they replace this one GetChannelEntriesThatReplace(ctx context.Context, name string) (entries []*ChannelEntry, err error) // Get the bundle in a package/channel that replace this one GetBundleThatReplaces(ctx context.Context, name, pkgName, channelName string) (string, error) // Get all channel entries that provide an api GetChannelEntriesThatProvide(ctx context.Context, group, version, kind string) (entries []*ChannelEntry, err error) // Get latest channel entries that provide an api GetLatestChannelEntriesThatProvide(ctx context.Context, group, version, kind string) (entries []*ChannelEntry, err error) // Get the the latest bundle that provides the API in a default channel GetBundleThatProvides(ctx context.Context, group, version, kind string) (string, *ChannelEntry, error) }