pkg

package
v0.6.0 Latest Latest
Warning

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

Go to latest
Published: Jan 31, 2025 License: Apache-2.0 Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type PackageWrapper

type PackageWrapper struct {
	// The developer-facing name of the chart
	Name string
	// The user-facing (i.e. pretty) chart name
	DisplayName string
	// Filtered subset of versions to be fetched
	FetchVersions repo.ChartVersions
	// Path stores the package path in current repository
	Path string
	// SourceMetadata represents metadata fetched from the upstream repository
	SourceMetadata *fetcher.ChartSourceMetadata
	// The package's upstream.yaml file
	UpstreamYaml *upstreamyaml.UpstreamYaml
	// The user-facing (i.e. pretty) chart vendor name
	DisplayVendor string
	// The developer-facing chart vendor name
	Vendor string
}

PackageWrapper is the manifestation of the concept of a package, which is configuration that refers to an upstream helm chart plus any local modifications that may be made to those helm charts as they are being integrated into the partner charts repository.

PackageWrapper is not called Package because the most obvious name for instances of it would be "package", which conflicts with the "package" golang keyword.

func ListPackageWrappers

func ListPackageWrappers(paths p.Paths, currentPackage string) ([]PackageWrapper, error)

ListPackageWrappers reads packages and their upstream.yaml from the packages directory and returns them in a slice. If currentPackage is specified, it must be in <vendor>/<name> format (i.e. the "full" package name). If currentPackage is specified, the function returns a slice with only one element, which is the specified package.

func (*PackageWrapper) FullName

func (packageWrapper *PackageWrapper) FullName() string

func (PackageWrapper) GetOverlayFiles

func (pw PackageWrapper) GetOverlayFiles() (map[string][]byte, error)

GetOverlayFiles returns the package's overlay files as a map where the keys are the path to the file relative to the helm chart root (i.e. Chart.yaml would have the path "Chart.yaml") and the values are the contents of the file.

func (*PackageWrapper) Populate

func (packageWrapper *PackageWrapper) Populate(paths p.Paths) (bool, error)

Populates PackageWrapper with relevant data from upstream and checks for updates. Returns true if newer package version is available.

Jump to

Keyboard shortcuts

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