chartfs

package
v1.4.0 Latest Latest
Warning

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

Go to latest
Published: Feb 5, 2025 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var ErrFailedToReadEmbeddedFiles = errors.New("failed to read embedded files")

ErrFailedToReadEmbeddedFiles returned when the tarball is not readable.

Functions

This section is empty.

Types

type BufferedFiles

type BufferedFiles struct {
	// contains filtered or unexported fields
}

BufferedFiles represents the group of files needed to load a Helm chart in memory, the files data is stored as `loader.BufferedFile` instances.

func NewBufferedFiles

func NewBufferedFiles(cfs fs.FS, baseDir string) *BufferedFiles

NewBufferedFiles creates a new BufferedFiles instance.

func (*BufferedFiles) Files

func (b *BufferedFiles) Files() []*loader.BufferedFile

Files returns the buffered files collected by "Walk" function.

func (*BufferedFiles) Walk

func (b *BufferedFiles) Walk(filePath string, d fs.DirEntry, err error) error

Walk is the callback function used by "fs.WalkDir" to collect the files data.

type ChartFS

type ChartFS struct {
	// contains filtered or unexported fields
}

ChartFS represents a file system abstraction which provides the Helm charts payload, and as well the "values.yaml.tpl" file. It uses the embedded tarball as data source, and as well, the local file system.

func NewChartFS

func NewChartFS(baseDir string) (*ChartFS, error)

NewChartFS instantiates a ChartFS instance using the embedded tarball, and the local base directory.

func NewChartFSForCWD

func NewChartFSForCWD() (*ChartFS, error)

NewChartFSForCWD instantiates a ChartFS instance using the current working directory.

func (*ChartFS) GetChartFiles added in v1.4.0

func (c *ChartFS) GetChartFiles(chartPath string) (*chart.Chart, error)

GetChartFiles returns the informed Helm chart path instantiated files.

func (*ChartFS) ReadFile

func (c *ChartFS) ReadFile(name string) ([]byte, error)

ReadFile reads the file from the file system.

Jump to

Keyboard shortcuts

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