chartutil

package
v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2022 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Examples

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type ErrNoTable

type ErrNoTable struct {
	Key string
}

ErrNoTable indicates that a chart does not have a matching table.

func (ErrNoTable) Error

func (e ErrNoTable) Error() string

type ErrNoValue

type ErrNoValue struct {
	Key string
}

ErrNoValue indicates that Values does not contain a key with a value

func (ErrNoValue) Error

func (e ErrNoValue) Error() string

type ReleaseOptions

type ReleaseOptions struct {
	Name     string
	Revision int
}

type Values

type Values map[string]interface{}

Values represents a collection of chart values.

Example
doc := `
title: "Moby Dick"
chapter:
  one:
    title: "Loomings"
  two:
    title: "The Carpet-Bag"
  three:
    title: "The Spouter Inn"
`
d, err := ReadValues([]byte(doc))
if err != nil {
	panic(err)
}
ch1, err := d.Table("chapter.one")
if err != nil {
	panic("could not find chapter one")
}
fmt.Print(ch1["title"])
Output:

Loomings

func CoalesceValues

func CoalesceValues(chrt *chart.Chart, vals map[string]interface{}) (Values, error)

func ReadValues

func ReadValues(data []byte) (vals Values, err error)

ReadValues will parse YAML byte data into a Values.

func ReadValuesFile

func ReadValuesFile(filename string) (Values, error)

ReadValuesFile will parse a YAML file into a map of values.

func ToRenderValues

func ToRenderValues(chrt *chart.Chart, options ReleaseOptions, chrtVals map[string]interface{}) (Values, error)

func (Values) AsMap

func (v Values) AsMap() map[string]interface{}

AsMap is a utility function for converting Values to a map[string]interface{}.

It protects against nil map panics.

func (Values) Encode

func (v Values) Encode(w io.Writer) error

Encode writes serialized Values information to the given io.Writer.

func (Values) PathValue

func (v Values) PathValue(path string) (interface{}, error)

func (Values) Table

func (v Values) Table(name string) (Values, error)

func (Values) YAML

func (v Values) YAML() (string, error)

YAML encodes the Values into a YAML string.

Jump to

Keyboard shortcuts

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