repo

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Jul 24, 2020 License: Apache-2.0 Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Package

type Package struct {
	afero.Fs

	OperatorName    string
	OperatorVersion semver.Version
	AppVersion      *semver.Version
}

Package wraps a package file system with additional information contained in the package.

func NewPackage

func NewPackage(pkgFs afero.Fs) (Package, error)

NewPackage creates a new Package by extracting version information from a file system of an operator package. The base path of 'pkgFs' is assumed to contain an operator package.

func (Package) Equal

func (p Package) Equal(other Package) bool

Equal checks for equality of package versions.

func (Package) String

func (p Package) String() string

String returns a string representation of a package.

type SyncedRepo

type SyncedRepo struct {
	URL string
	// contains filtered or unexported fields
}

SyncedRepo manages operator packages of a file system. If packages are added, an updated index file is created.

func NewSyncedRepo

func NewSyncedRepo(fs afero.Fs, repoURL string) (*SyncedRepo, error)

NewSyncedRepo create a new repository in a file system. The repoURL parameter determines the URL to use for package file URLs in the repository index.

func (*SyncedRepo) Add

func (s *SyncedRepo) Add(pkg Package) (tarballName string, err error)

Add adds an operator package to the repository. The package contents are provided as a file system.

func (SyncedRepo) Contains

func (s SyncedRepo) Contains(pkg Package) bool

Contains checks if a specific operator package is in the repository.

Jump to

Keyboard shortcuts

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