Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var Default = &RepositoryConfiguration{
URL: "https://kudo-repository.storage.googleapis.com",
}
Default initialized repository.
Functions ¶
func GetOperatorVersionDependencies ¶ added in v0.3.0
func GetOperatorVersionDependencies(ov *v1alpha1.OperatorVersion) ([]string, error)
GetOperatorVersionDependencies helper method returns a slice of strings that contains the names of all dependency Operators
Types ¶
type BundleVersion ¶
type BundleVersion struct { *Metadata URLs []string `json:"urls"` Created time.Time `json:"created,omitempty"` Removed bool `json:"removed,omitempty"` Digest string `json:"digest,omitempty"` }
BundleVersion represents a operator entry in the IndexFile
type BundleVersions ¶
type BundleVersions []*BundleVersion
BundleVersions is a list of versioned bundle references. Implements a sorter on Version.
func (BundleVersions) Len ¶
func (b BundleVersions) Len() int
Len returns the length. this is needed to allow sorting of packages
func (BundleVersions) Less ¶
func (b BundleVersions) Less(x, y int) bool
Less returns true if the version of entry a is less than the version of entry b. this is needed to allow sorting of packages
func (BundleVersions) Swap ¶
func (b BundleVersions) Swap(i, j int)
Swap swaps the position of two items in the versions slice. this is needed to allow sorting of packages
type IndexFile ¶
type IndexFile struct { APIVersion string `json:"apiVersion"` Entries map[string]BundleVersions `json:"entries"` }
IndexFile represents the index file in a operator repository
func (IndexFile) GetByNameAndVersion ¶
func (i IndexFile) GetByNameAndVersion(name, version string) (*BundleVersion, error)
GetByNameAndVersion returns the operator of given name and version. If no specific version is required, pass an empty string as version and the the latest version will be returned.
type Maintainer ¶
type Maintainer struct { // Name is a user name or organization name. Name string `json:"name,omitempty"` // Email is an optional email address to contact the named maintainer. Email string `json:"email,omitempty"` // URL is an optional URL to an address for the named maintainer. URL string `json:"url,omitempty"` }
Maintainer describes a Operator maintainer.
type Metadata ¶
type Metadata struct { // Name is the name of the operator. Name string `json:"name,omitempty"` // Version is a A SemVer 2 conformant version string of the operator. Version string `protobuf:"bytes,4,opt,name=version" json:"version,omitempty"` // The URL to a relevant project page, git repo, or contact person. Home string `json:"home,omitempty"` // Source is the URL to the source code of this operator. Sources []string `json:"sources,omitempty"` // Description is a one-sentence description of the operator. Description string `json:"description,omitempty"` // Maintainers is a list of name and URL/email addresses of the maintainer(s). Maintainers []*Maintainer `json:"maintainers,omitempty"` // Deprecated reflects whether this operator is deprecated. Deprecated bool `json:"deprecated,omitempty"` }
Metadata for a Operator. This models the structure of a bundle.yaml file.
type OperatorRepository ¶ added in v0.3.0
type OperatorRepository struct { Config *RepositoryConfiguration Client http.Client }
OperatorRepository represents a operator repository
func NewOperatorRepository ¶ added in v0.3.0
func NewOperatorRepository(conf *RepositoryConfiguration) (*OperatorRepository, error)
NewOperatorRepository constructs OperatorRepository
func (*OperatorRepository) GetBundle ¶ added in v0.4.0
GetBundle provides an Bundle for a provided package name and optional version
func (*OperatorRepository) GetPackageReader ¶ added in v0.3.0
GetPackageReader provides an io.Reader for a provided package name and optional version
type Repository ¶ added in v0.3.0
Repository is a abstraction for a service that can retrieve package bundles
type RepositoryConfiguration ¶
type RepositoryConfiguration struct {
URL string `json:"url"`
}
RepositoryConfiguration represents a collection of parameters for operator repository.