Documentation
¶
Index ¶
- Variables
- func IsDependencyFile(d PossibleDependencyFile) bool
- func SyncToDisk(d PossibleDependencyFile)
- type Chart
- func (c *Chart) GetDependeciesTemplates() []*DependencyTemplateFile
- func (c *Chart) GetDependecyURI(dependencyName string) uri.URI
- func (c *Chart) GetMetadataLocation(templateContext []string) (lsp.Location, error)
- func (c *Chart) NewDependencyTemplateFile(chartName string, file *chart.File) *DependencyTemplateFile
- func (c *Chart) ResolveValueFiles(query []string, chartStore *ChartStore) (result []*QueriedValuesFiles)
- func (c *Chart) ResolveValueFilesRecursive(query []string, chartStore *ChartStore, result map[uri.URI]*QueriedValuesFiles)
- type ChartMetadata
- type ChartStore
- func (s *ChartStore) AddChart(chart *Chart)
- func (s *ChartStore) GetChartForDoc(uri lsp.DocumentURI) (*Chart, error)
- func (s *ChartStore) GetChartForURI(fileURI uri.URI) (*Chart, error)
- func (s *ChartStore) GetChartOrParentForDoc(uri lsp.DocumentURI) (*Chart, error)
- func (s *ChartStore) ReloadValuesFile(file uri.URI)
- func (s *ChartStore) SetValuesFilesConfig(valuesFilesConfig util.ValuesFilesConfig)
- type DependencyTemplateFile
- type ErrChartNotFound
- type ParentChart
- type PossibleDependencyFile
- type QueriedValuesFiles
- type ValuesFile
- type ValuesFiles
Constants ¶
This section is empty.
Variables ¶
View Source
var DependencyCacheFolder = ".helm_ls_cache"
Functions ¶
func IsDependencyFile ¶ added in v0.1.0
func IsDependencyFile(d PossibleDependencyFile) bool
func SyncToDisk ¶ added in v0.1.0
func SyncToDisk(d PossibleDependencyFile)
SyncToDisk writes the content of the document to disk if it is a dependency file. If it is a dependency file, it was read from a archive, so we need to write it back, to be able to open it in a editor when using go-to-definition or go-to-reference.
Types ¶
type Chart ¶
type Chart struct { ValuesFiles *ValuesFiles ChartMetadata *ChartMetadata RootURI uri.URI ParentChart ParentChart HelmChart *chart.Chart }
func NewChartFromHelmChart ¶ added in v0.1.0
func (*Chart) GetDependeciesTemplates ¶ added in v0.1.0
func (c *Chart) GetDependeciesTemplates() []*DependencyTemplateFile
func (*Chart) GetDependecyURI ¶ added in v0.1.0
func (*Chart) GetMetadataLocation ¶ added in v0.1.0
func (*Chart) NewDependencyTemplateFile ¶ added in v0.1.0
func (c *Chart) NewDependencyTemplateFile(chartName string, file *chart.File) *DependencyTemplateFile
func (*Chart) ResolveValueFiles ¶
func (c *Chart) ResolveValueFiles(query []string, chartStore *ChartStore) (result []*QueriedValuesFiles)
ResolveValueFiles returns a list of all values files in the chart and all parent and dependency charts with the adjusted query
func (*Chart) ResolveValueFilesRecursive ¶ added in v0.1.0
func (c *Chart) ResolveValueFilesRecursive(query []string, chartStore *ChartStore, result map[uri.URI]*QueriedValuesFiles)
type ChartMetadata ¶
func NewChartMetadata ¶
func NewChartMetadata(rootURI uri.URI) *ChartMetadata
func NewChartMetadataForDependencyChart ¶ added in v0.1.0
func NewChartMetadataForDependencyChart(metadata *chart.Metadata, URI uri.URI) *ChartMetadata
Create a new ChartMetadata for a dependency chart, omitting the YamlNode since this is likely not required for dependency charts
type ChartStore ¶
type ChartStore struct { Charts map[uri.URI]*Chart RootURI uri.URI // contains filtered or unexported fields }
func NewChartStore ¶
func NewChartStore(rootURI uri.URI, newChart func(uri.URI, util.ValuesFilesConfig) *Chart, addChartCallback func(chart *Chart)) *ChartStore
func (*ChartStore) AddChart ¶ added in v0.1.0
func (s *ChartStore) AddChart(chart *Chart)
AddChart adds a new chart to the store and loads its dependencies
func (*ChartStore) GetChartForDoc ¶
func (s *ChartStore) GetChartForDoc(uri lsp.DocumentURI) (*Chart, error)
func (*ChartStore) GetChartForURI ¶
func (s *ChartStore) GetChartForURI(fileURI uri.URI) (*Chart, error)
func (*ChartStore) GetChartOrParentForDoc ¶ added in v0.0.14
func (s *ChartStore) GetChartOrParentForDoc(uri lsp.DocumentURI) (*Chart, error)
func (*ChartStore) ReloadValuesFile ¶
func (s *ChartStore) ReloadValuesFile(file uri.URI)
func (*ChartStore) SetValuesFilesConfig ¶
func (s *ChartStore) SetValuesFilesConfig(valuesFilesConfig util.ValuesFilesConfig)
type DependencyTemplateFile ¶ added in v0.1.0
type ErrChartNotFound ¶
type ErrChartNotFound struct {
URI lsp.DocumentURI
}
func (ErrChartNotFound) Error ¶
func (e ErrChartNotFound) Error() string
type ParentChart ¶
func (*ParentChart) GetParentChart ¶
func (p *ParentChart) GetParentChart(chartStore *ChartStore) *Chart
func (*ParentChart) GetParentChartRecursive ¶ added in v0.0.14
func (p *ParentChart) GetParentChartRecursive(chartStore *ChartStore) *Chart
type PossibleDependencyFile ¶ added in v0.1.0
type QueriedValuesFiles ¶
type QueriedValuesFiles struct { Selector []string ValuesFiles *ValuesFiles }
type ValuesFile ¶
type ValuesFile struct { Values chartutil.Values ValueNode yaml.Node URI uri.URI // contains filtered or unexported fields }
func NewValuesFileFromContent ¶ added in v0.1.0
func NewValuesFileFromContent(uri uri.URI, data []byte) *ValuesFile
func NewValuesFileFromPath ¶ added in v0.1.0
func NewValuesFileFromPath(filePath string) *ValuesFile
func (*ValuesFile) GetContent ¶ added in v0.1.0
func (v *ValuesFile) GetContent() []byte
GetContent implements PossibleDependencyFile.
func (*ValuesFile) GetPath ¶ added in v0.1.0
func (v *ValuesFile) GetPath() string
GetPath implements PossibleDependencyFile.
func (*ValuesFile) Reload ¶
func (v *ValuesFile) Reload()
type ValuesFiles ¶
type ValuesFiles struct { MainValuesFile *ValuesFile OverlayValuesFile *ValuesFile AdditionalValuesFiles []*ValuesFile }
func NewValuesFiles ¶
func (*ValuesFiles) AllValuesFiles ¶
func (v *ValuesFiles) AllValuesFiles() []*ValuesFile
func (*ValuesFiles) GetPositionsForValue ¶
func (v *ValuesFiles) GetPositionsForValue(query []string) []lsp.Location
Click to show internal directories.
Click to hide internal directories.