index

package
v1.0.14 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func LoadFromFile

func LoadFromFile(filePath string) (*index, error)

LoadFromFile parses an index from a file

Types

type Entry

type Entry struct {
	Version string `yaml:"version"`
}

Entry is for deserializing chart entries in a Helm repo index.yaml

type Index

type Index interface {
	// Versions returns a list of all published versions of the chart
	Versions(chartName string) []string
	// HasVersion returns true if the index contains the given version for the given chart
	HasVersion(chartName string, version string) bool
	// MostRecentVersion returns the most recent / highest semantic version of the chart in the index
	MostRecentVersion(chartName string) string
}

Index represents a Helm repo's index.yaml

type MockIndex

type MockIndex struct {
	mock.Mock
}

func NewMockIndex

func NewMockIndex() *MockIndex

func (*MockIndex) HasVersion

func (m *MockIndex) HasVersion(chartName string, version string) bool

func (*MockIndex) MostRecentVersion

func (m *MockIndex) MostRecentVersion(chartName string) string

func (*MockIndex) Versions

func (m *MockIndex) Versions(chartName string) []string

Jump to

Keyboard shortcuts

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