utils

package
v0.3.3 Latest Latest
Warning

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

Go to latest
Published: Mar 26, 2024 License: Apache-2.0 Imports: 14 Imported by: 0

Documentation

Overview

Original source: https://raw.githubusercontent.com/helm/helm/952708b436bb2c8d5ef0e2e9ef1d8aabe64aeae9/pkg/engine/funcs.go

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ConvertPath

func ConvertPath(path string) string

func ParseYAML

func ParseYAML(data []byte) (map[interface{}]interface{}, error)

Convert YAML/JSON data to a map[interface{}]interface{}.

func PrintJSON

func PrintJSON(data map[interface{}]interface{}) error

create a golang function which prints map[interface{}]interface{}

func PrintYAML

func PrintYAML(data map[interface{}]interface{}) error

create a golang function which prints map[interface{}]interface{} as yaml

func SprigFuncMap added in v0.3.0

func SprigFuncMap() template.FuncMap

funcMap returns a mapping of all of the functions that Engine has.

Because some functions are late-bound (e.g. contain context-sensitive data), the functions may not all perform identically outside of an Engine as they will inside of an Engine.

Known late-bound functions:

  • "include"
  • "tpl"

These are late-bound in Engine.Render(). The version included in the FuncMap is a placeholder.

func Template added in v0.3.0

func Template(data []byte, values map[interface{}]interface{}) (map[interface{}]interface{}, error)

func ToInterface

func ToInterface(inputMap map[string]interface{}) map[interface{}]interface{}

Convert converts a map[string]interface{} to a map[interface{}]interface{}.

func ToMap

func ToMap(i map[interface{}]interface{}) map[string]interface{}

convert map[interface{}]interface{} recursive to map[string]string

func UnmarshalJSONorYAML added in v0.3.0

func UnmarshalJSONorYAML(data []byte) (map[string]interface{}, error)

Types

type File

type File struct {
	Path string
	// contains filtered or unexported fields
}

func NewFile

func NewFile(path string) (*File, error)

func (*File) Byte

func (f *File) Byte() []byte

func (*File) JSON

func (f *File) JSON() ([]byte, error)

func (*File) Map

func (f *File) Map() (map[interface{}]interface{}, error)

func (*File) OverwriteDataByte added in v0.3.0

func (f *File) OverwriteDataByte(data []byte)

func (*File) SPRUCE

func (f *File) SPRUCE() (map[interface{}]interface{}, error)

func (*File) YAML

func (f *File) YAML() ([]byte, error)

Jump to

Keyboard shortcuts

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