Documentation ¶
Index ¶
- Variables
- func ChartPackageFilenameFromContent(content []byte) (string, error)
- func ChartPackageFilenameFromNameVersion(name string, version string) string
- func ChartVersionFromStorageObject(object storage.Object) (*helm_repo.ChartVersion, error)
- func ProvenanceFilenameFromContent(content []byte) (string, error)
- func ProvenanceFilenameFromNameVersion(name string, version string) string
- func StorageObjectFromChartVersion(chartVersion *helm_repo.ChartVersion) storage.Object
- type Index
- func (index *Index) AddEntry(chartVersion *helm_repo.ChartVersion)
- func (index *Index) HasEntry(chartVersion *helm_repo.ChartVersion) bool
- func (index *Index) Regenerate() error
- func (index *Index) RemoveEntry(chartVersion *helm_repo.ChartVersion)
- func (index *Index) UpdateEntry(chartVersion *helm_repo.ChartVersion)
- type IndexFile
- type ServerInfo
Constants ¶
This section is empty.
Variables ¶
var ( // ChartPackageFileExtension is the file extension used for chart packages ChartPackageFileExtension = "tgz" // ChartPackageContentType is the http content-type header for chart packages ChartPackageContentType = "application/x-tar" // ErrorInvalidChartPackage is raised when a chart package is invalid ErrorInvalidChartPackage = errors.New("invalid chart package") )
var ( // IndexFileContentType is the http content-type header for index.yaml IndexFileContentType = "application/x-yaml" StatefileFilename = "index-cache.yaml" )
var ( // ProvenanceFileExtension is the file extension used for provenance files ProvenanceFileExtension = "tgz.prov" // ProvenanceFileContentType is the http content-type header for provenance files ProvenanceFileContentType = "application/pgp-signature" // ErrorInvalidProvenanceFile is raised when a provenance file is invalid ErrorInvalidProvenanceFile = errors.New("invalid provenance file") )
Functions ¶
func ChartPackageFilenameFromContent ¶
ChartPackageFilenameFromContent returns a chart filename from binary content
func ChartPackageFilenameFromNameVersion ¶
ChartPackageFilenameFromNameVersion returns a chart filename from a name and version
func ChartVersionFromStorageObject ¶
func ChartVersionFromStorageObject(object storage.Object) (*helm_repo.ChartVersion, error)
ChartVersionFromStorageObject returns a chart version from a storage object
func ProvenanceFilenameFromContent ¶
ProvenanceFilenameFromContent returns a provenance filename from binary content
func ProvenanceFilenameFromNameVersion ¶
ProvenanceFilenameFromNameVersion returns a provenance filename from a name and version
func StorageObjectFromChartVersion ¶ added in v0.7.0
func StorageObjectFromChartVersion(chartVersion *helm_repo.ChartVersion) storage.Object
StorageObjectFromChartVersion returns a storage object from a chart version (empty content)
Types ¶
type Index ¶
type Index struct { // cryptic JSON field names to minimize size saved in cache *IndexFile `json:"a"` RepoName string `json:"b"` Raw []byte `json:"c"` ChartURL string `json:"d"` }
Index represents the repository index (index.yaml)
func NewIndex ¶
func NewIndex(chartURL string, repo string, serverInfo *ServerInfo) *Index
NewIndex creates a new instance of Index
func (*Index) AddEntry ¶
func (index *Index) AddEntry(chartVersion *helm_repo.ChartVersion)
AddEntry adds a chart version to index
func (*Index) HasEntry ¶ added in v0.2.5
func (index *Index) HasEntry(chartVersion *helm_repo.ChartVersion) bool
HasEntry checks if index has already an entry
func (*Index) Regenerate ¶
Regenerate sorts entries in index file and sets current time for generated key
func (*Index) RemoveEntry ¶
func (index *Index) RemoveEntry(chartVersion *helm_repo.ChartVersion)
RemoveEntry removes a chart version from index
func (*Index) UpdateEntry ¶
func (index *Index) UpdateEntry(chartVersion *helm_repo.ChartVersion)
UpdateEntry updates a chart version in index
type IndexFile ¶ added in v0.8.0
type IndexFile struct { *helm_repo.IndexFile ServerInfo *ServerInfo `json:"serverInfo"` }
IndexFile is a copy of Helm struct with extra data
type ServerInfo ¶ added in v0.8.0
type ServerInfo struct {
ContextPath string `json:"contextPath,omitempty"`
}
ServerInfo contains extra data about the server