v0.0.2 Latest Latest

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

Go to latest
Published: Mar 29, 2021 License: Apache-2.0 Imports: 17 Imported by: 0




View Source
const APIVersionV1 = "v1"

APIVersionV1 is the v1 API version for index and repository files.


View Source
var (
	// ErrNoAPIVersion indicates that an API version was not specified.
	ErrNoAPIVersion = errors.New("no API version specified")

	// ErrNoChartVersion indicates that a chart with the given version is not found.
	ErrNoChartVersion = errors.New("no chart version found")
	// ErrNoChartName indicates that a chart with the given name is not found.
	ErrNoChartName = errors.New("no chart name found")


This section is empty.


type ChartRepository

type ChartRepository struct {

ChartRepository represents a chart repository

ChartRepository is a composite type of Helm's repo.ChartRepository

func NewChartRepository

func NewChartRepository(cfg *helmRepo.Entry, getters getter.Providers) (*ChartRepository, error)

NewChartRepository constructs ChartRepository

type ChartVersions

type ChartVersions struct {
	ChartVersions []*helmRepo.ChartVersion

ChartVersions is a list of versioned chart references. Implements a sorter on Version.

This is a composition for helms `type ChartVersions []*ChartVersion`

type File

type File struct {

File represents the repositories.yaml file

File is a composite type of helm/pkg/repo.File

func LoadFile

func LoadFile(path string) (*File, error)

LoadFile takes a file at the given path and returns a File object

func NewFile

func NewFile() *File

NewFile generates an empty repositories file.

Generated and APIVersion are automatically set.

type IndexFile

type IndexFile struct {

IndexFile represents the index file in a chart repository

This is a composite type of helm's Indexfile

func IndexDirectory

func IndexDirectory(dir, baseURL string) (*IndexFile, error)

IndexDirectory reads a (flat) directory and generates an index.

It indexes only charts that have been packaged (*.tgz).

The index returned will be in an unsorted state

func LoadIndexFile

func LoadIndexFile(path string) (*IndexFile, error)

LoadIndexFile takes a file at the given path and returns an IndexFile object

func NewIndexFile

func NewIndexFile() *IndexFile

NewIndexFile initializes an index

func (*IndexFile) Merge

func (i *IndexFile) Merge(f *IndexFile)

Merge merges the given index file into this index.

This merges by name and version.

If one of the entries in the given index does _not_ already exist, it is added. In all other cases, the existing record is preserved.

This can leave the index in an unsorted state

Jump to

Keyboard shortcuts

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