Documentation ¶
Index ¶
- Constants
- func Digest(in io.Reader) (string, error)
- func DigestFile(filename string) (string, error)
- func IsHelm3() bool
- func SetupHelm()
- type Chart
- type ChartMetadata
- type ChartV2
- type ChartV3
- type Index
- type IndexV2
- func (idx *IndexV2) Add(metadata interface{}, filename, baseURL, digest string) error
- func (idx *IndexV2) AddOrReplace(metadata interface{}, filename, baseURL, digest string) error
- func (idx *IndexV2) Delete(name, version string) (url string, err error)
- func (idx *IndexV2) Has(name, version string) bool
- func (idx *IndexV2) MarshalBinary() (data []byte, err error)
- func (idx *IndexV2) Reader() (io.Reader, error)
- func (idx *IndexV2) SortEntries()
- func (idx *IndexV2) UnmarshalBinary(data []byte) error
- func (idx *IndexV2) WriteFile(dest string, mode os.FileMode) error
- type IndexV3
- func (idx *IndexV3) Add(metadata interface{}, filename, baseURL, digest string) error
- func (idx *IndexV3) AddOrReplace(metadata interface{}, filename, baseURL, digest string) error
- func (idx *IndexV3) Delete(name, version string) (url string, err error)
- func (idx *IndexV3) Has(name, version string) bool
- func (idx *IndexV3) MarshalBinary() (data []byte, err error)
- func (idx *IndexV3) Reader() (io.Reader, error)
- func (idx *IndexV3) SortEntries()
- func (idx *IndexV3) UnmarshalBinary(data []byte) error
- func (idx *IndexV3) WriteFile(dest string, mode os.FileMode) error
- type RepoEntry
- type RepoEntryV2
- type RepoEntryV3
Constants ¶
View Source
const (
// DefaultIndexFilePerm is default permissions for index file.
DefaultIndexFilePerm = 0644
)
Variables ¶
This section is empty.
Functions ¶
func DigestFile ¶ added in v0.9.0
DigestFile calculates a SHA256 hash for a given file.
Types ¶
type Chart ¶ added in v0.9.0
type Chart interface { // Name returns chart name. // Example: "foo". Name() string // Version returns chart version. // Example: "0.1.0". Version() string // Metadata returns chart metadata. Metadata() ChartMetadata }
Chart describes a helm chart.
func LoadArchive ¶ added in v0.9.0
LoadArchive returns chart loaded from the archive file reader.
type ChartMetadata ¶ added in v0.9.0
type ChartMetadata interface { // MarshalJSON marshals chart metadata to JSON. MarshalJSON() ([]byte, error) // UnmarshalJSON unmarshals chart metadata from JSON. UnmarshalJSON([]byte) error // Value returns underlying chart metadata value. Value() interface{} }
ChartMetadata describes helm chart metadata.
func NewChartMetadata ¶ added in v0.9.0
func NewChartMetadata() ChartMetadata
NewChartMetadata returns a new helm chart metadata.
type ChartV2 ¶ added in v0.9.0
type ChartV2 struct {
// contains filtered or unexported fields
}
ChartV2 implements Chart in Helm v2.
func (ChartV2) Metadata ¶ added in v0.9.0
func (c ChartV2) Metadata() ChartMetadata
type ChartV3 ¶ added in v0.9.0
type ChartV3 struct {
// contains filtered or unexported fields
}
ChartV3 implements Chart in Helm v3.
func (ChartV3) Metadata ¶ added in v0.9.0
func (c ChartV3) Metadata() ChartMetadata
type Index ¶ added in v0.9.0
type Index interface { // Add adds chart version to the index. // // Note: this can leave the index in an unsorted state. Add(metadata interface{}, filename, baseURL, digest string) error // AddOrReplace adds chart version to the index, replacing the version if it exists instead // of adding it to the list of versions. Note that helm Add method does not control whether // the chart version exists, allowing for duplicates. This methods prevents duplicates // by replacing the chart. // // Note: this can leave the index in an unsorted state. AddOrReplace(metadata interface{}, filename, baseURL, digest string) error // Delete removes chart version from the index and returns url to the deleted item. Delete(name, version string) (url string, err error) // Has returns true if the index has an entry for a chart with the given name and exact version. Has(name, version string) bool // SortEntries sorts the entries by version in descending order. SortEntries() // MarshalBinary encodes index to a binary form. MarshalBinary() (data []byte, err error) // UnmarshalBinary decodes index from a binary form. UnmarshalBinary(b []byte) error // Reader returns io.Reader for index. Reader() (io.Reader, error) // WriteFile writes an index file to the given destination path. WriteFile(dest string, mode os.FileMode) error }
Index describes helm chart repo index.
type IndexV2 ¶ added in v0.9.0
type IndexV2 struct {
// contains filtered or unexported fields
}
func (*IndexV2) AddOrReplace ¶ added in v0.9.0
func (*IndexV2) MarshalBinary ¶ added in v0.9.0
func (*IndexV2) SortEntries ¶ added in v0.9.0
func (idx *IndexV2) SortEntries()
func (*IndexV2) UnmarshalBinary ¶ added in v0.9.0
type IndexV3 ¶ added in v0.9.0
type IndexV3 struct {
// contains filtered or unexported fields
}
func (*IndexV3) AddOrReplace ¶ added in v0.9.0
func (*IndexV3) MarshalBinary ¶ added in v0.9.0
func (*IndexV3) SortEntries ¶ added in v0.9.0
func (idx *IndexV3) SortEntries()
func (*IndexV3) UnmarshalBinary ¶ added in v0.9.0
type RepoEntry ¶ added in v0.9.0
type RepoEntry interface { // URL returns repo URL. // Examples: // - https://kubernetes-charts.storage.googleapis.com/ // - s3://my-charts URL() string // IndexURI returns repo index file URL. // Examples: // - https://kubernetes-charts.storage.googleapis.com/index.yaml // - s3://my-charts/index.yaml IndexURL() string // CacheFile returns repo local cache file path. // Examples: // - /Users/foo/Library/Caches/helm/repository/my-charts-index.yaml (on macOS) // - /home/foo/.cache/helm/repository/my-charts-index.yaml (on Linux) CacheFile() string }
func LookupRepoEntry ¶
LookupRepoEntry returns an entry from helm's repositories.yaml file by name.
type RepoEntryV2 ¶ added in v0.9.0
type RepoEntryV2 struct {
// contains filtered or unexported fields
}
RepoEntryV2 implements RepoEntry in Helm v2.
func (RepoEntryV2) CacheFile ¶ added in v0.9.0
func (r RepoEntryV2) CacheFile() string
func (RepoEntryV2) IndexURL ¶ added in v0.9.0
func (r RepoEntryV2) IndexURL() string
func (RepoEntryV2) URL ¶ added in v0.9.0
func (r RepoEntryV2) URL() string
type RepoEntryV3 ¶ added in v0.9.0
type RepoEntryV3 struct {
// contains filtered or unexported fields
}
RepoEntryV3 implements RepoEntry in Helm v3.
func (RepoEntryV3) CacheFile ¶ added in v0.9.0
func (r RepoEntryV3) CacheFile() string
func (RepoEntryV3) IndexURL ¶ added in v0.9.0
func (r RepoEntryV3) IndexURL() string
func (RepoEntryV3) URL ¶ added in v0.9.0
func (r RepoEntryV3) URL() string
Click to show internal directories.
Click to hide internal directories.