{"modulePath":"github.com/devth/helm","version":"v2.0.0-alpha.1+incompatible","isLatest":false,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package chart\n\nPackage chart implements the Chart format.\n\nThis package provides tools for working with the Chart format, including the Chartfile (chart.yaml) and compressed chart archives.\n\n## Constants\n\n```go\nconst ChartfileName string = \"Chart.yaml\"\n```\nChartfileName is the default Chart file name.\n\n## Variables\n\n```go\nvar ErrNoTable = errors.New(\"no table\")\n```\nErrNoTable indicates that a chart does not have a matching table.\n\n## Functions\n\n```go\nfunc Expand(dir string, r io.Reader) error\n```\nExpand uncompresses and extracts a chart into the specified directory.\n\n```go\nfunc Save(c *Chart, outDir string) (string, error)\n```\nSave creates an archived chart to the given directory.\n\nThis takes an existing chart and a destination directory.\n\nIf the directory is /foo, and the chart is named bar, with version 1.0.0, this will generate /foo/bar-1.0.0.tgz.\n\nThis returns the absolute path to the chart archive file.\n\n## Types\n\n```go\ntype Chart struct {\n\t// contains filtered or unexported fields\n}\n```\nChart represents a complete chart.\n\nA chart consists of the following parts:\n\n  - Chart.yaml: In code, we refer to this as the Chartfile\n  - templates/\\*: The template directory\n  - README.md: Optional README file\n  - LICENSE: Optional license file\n  - hooks/: Optional hooks registry\n  - docs/: Optional docs directory\n\nPacked charts are stored in gzipped tar archives (.tgz). Unpackaged charts are directories where the directory name is the Chartfile.Name.\n\nOptionally, a chart might also locate a provenance (.prov) file that it can use for cryptographic signing.\n\n```go\nfunc Create(chartfile *Chartfile, dir string) (*Chart, error)\n```\nCreate creates a new chart in a directory.\n\nInside of dir, this will create a directory based on the name of chartfile.Name. It will then write the Chart.yaml into this directory and create the (empty) appropriate directories.\n\nThe returned \\*Chart will point to the newly created directory.\n\nIf dir does not exist, this will return an error. If Chart.yaml or any directories cannot be created, this will return an error. In such a case, this will attempt to clean up by removing the new chart directory.\n\n```go\nfunc Load(archive string) (*Chart, error)\n```\nLoad loads a chart from a chart archive.\n\nA chart archive is a gzipped tar archive that follows the Chart format specification.\n\n```go\nfunc LoadChart(chfi string) (*Chart, error)\n```\nLoadChart loads an entire chart archive.\n\nThe following are valid values for 'chfi':\n\n  - relative path to the chart archive\n  - absolute path to the chart archive\n  - name of the chart directory\n\n```go\nfunc LoadData(data []byte) (*Chart, error)\n```\nLoadData loads a chart from data, where data is a \\[]byte containing a gzipped tar file.\n\n```go\nfunc LoadDataFromReader(r io.Reader) (*Chart, error)\n```\nLoadDataFromReader loads a chart from a reader\n\n```go\nfunc LoadDir(chart string) (*Chart, error)\n```\nLoadDir loads an entire chart from a directory.\n\nThis includes the Chart.yaml (\\*Chartfile) and all of the manifests.\n\nIf you are just reading the Chart.yaml file, it is substantially more performant to use LoadChartfile.\n\n```go\nfunc (c *Chart) ChartDepNames() ([]string, error)\n```\nChartDepNames returns the list of chart names found in ChartsDir.\n\n```go\nfunc (c *Chart) Chartfile() *Chartfile\n```\nChartfile gets the Chartfile (Chart.yaml) for this chart.\n\n```go\nfunc (c *Chart) ChartsDir() string\n```\nChartsDir returns the directory where dependency charts are stored.\n\n```go\nfunc (c *Chart) Close() error\n```\nClose the chart.\n\nCharts should always be closed when no longer needed.\n\n```go\nfunc (c *Chart) Dir() string\n```\nDir returns the directory where the charts are located.\n\n```go\nfunc (c *Chart) LoadContent() (*Content, error)\n```\nLoadContent loads contents of a chart directory into Content\n\n```go\nfunc (c *Chart) LoadMember(path string) (*Member, error)\n```\nLoadMember loads a chart member from a given path where path is the root of the chart.\n\n```go\nfunc (c *Chart) LoadTemplates() ([]*Member, error)\n```\nLoadTemplates loads the members of TemplatesDir().\n\n```go\nfunc (c *Chart) LoadValues() (Values, error)\n```\nLoadValues loads the contents of values.toml into a map\n\n```go\nfunc (c *Chart) TemplatesDir() string\n```\nTemplatesDir returns the directory where the templates are stored.\n\n```go\ntype Chartfile struct {\n\tName        string        `yaml:\"name\"`\n\tDescription string        `yaml:\"description\"`\n\tVersion     string        `yaml:\"version\"`\n\tKeywords    []string      `yaml:\"keywords,omitempty\"`\n\tMaintainers []*Maintainer `yaml:\"maintainers,omitempty\"`\n\tSource      []string      `yaml:\"sources,omitempty\"`\n\tHome        string        `yaml:\"home\"`\n}\n```\nChartfile describes a Helm Chart (e.g. Chart.yaml)\n\n```go\nfunc LoadChartfile(filename string) (*Chartfile, error)\n```\nLoadChartfile loads a Chart.yaml file into a \\*Chart.\n\n```go\nfunc (c *Chartfile) Marshal() ([]byte, error)\n```\nMarshal encodes the chart file into YAML.\n\n```go\nfunc (c *Chartfile) Save(filename string) error\n```\nSave saves a Chart.yaml file\n\n```go\ntype Content struct {\n\tChartfile *Chartfile `json:\"chartfile\"`\n\tMembers   []*Member  `json:\"members\"`\n}\n```\nContent is abstraction for the contents of a chart.\n\n```go\ntype Maintainer struct {\n\tName  string `yaml:\"name\"`\n\tEmail string `yaml:\"email,omitempty\"`\n}\n```\nMaintainer describes a chart maintainer.\n\n```go\ntype Member struct {\n\tPath    string `json:\"path\"`    // Path from the root of the chart.\n\tContent []byte `json:\"content\"` // Base64 encoded content.\n}\n```\nMember is a file in a chart.\n\n```go\ntype Values map[string]interface{}\n```\nValues represents a collection of chart values.\n\n```go\nfunc ReadValues(data []byte) (Values, error)\n```\nReadValues will parse TOML byte data into a Values.\n\n```go\nfunc ReadValuesFile(filename string) (Values, error)\n```\nReadValuesFile will parse a TOML file into a Values.\n\n```go\nfunc (v Values) Encode(w io.Writer) error\n```\nEncode writes serialized Values information to the given io.Writer.\n\n```go\nfunc (v Values) Table(name string) (Values, error)\n```\nTable gets a table (TOML subsection) from a Values object.\n\nThe table is returned as a Values.\n\nCompound table names may be specified with dots:\n\n\tfoo.bar\n\nThe above will be evaluated as \"The table bar inside the table foo\".\n\nAn ErrNoTable is returned if the table does not exist.\n\n","path":"github.com/devth/helm/pkg/chart","name":"chart","synopsis":"Package chart implements the Chart format.","isRedistributable":true}
