template

package
v0.16.8-rc1 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2022 License: MIT Imports: 17 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Exec

func Exec(command string, args []interface{}, inputs ...string) (string, error)

func FuncMap

func FuncMap(gomplateConfig *GomplateConfig) template.FuncMap

func Get

func Get(path string, varArgs ...interface{}) (interface{}, error)

func HasKey

func HasKey(path string, varArgs ...interface{}) (bool, error)

func ReadFile

func ReadFile(file string) (string, error)

func Required

func Required(warn string, val interface{}) (interface{}, error)

func RequiredEnv

func RequiredEnv(name string) (string, error)

func ToYaml

func ToYaml(v interface{}) (string, error)

func Tpl2yml

func Tpl2yml(tpl, yml string, data interface{}, gomplateConfig *GomplateConfig) error

Types

type Config added in v0.16.0

type Config struct {
	Gomplate GomplateConfig
}

type GomplateConfig added in v0.16.0

type GomplateConfig struct {
	Datasources map[string]Source

	Enabled bool
	// contains filtered or unexported fields
}

type Source added in v0.16.0

type Source struct {
	URL *url.URL
}

func (Source) MarshalYAML added in v0.16.6

func (s Source) MarshalYAML() (interface{}, error)

func (*Source) UnmarshalYAML added in v0.16.0

func (s *Source) UnmarshalYAML(unmarshal func(v interface{}) error) error

type Values

type Values = map[string]interface{}

func FromYaml

func FromYaml(str string) (Values, error)

func SetValueAtPath

func SetValueAtPath(path string, value interface{}, values Values) (Values, error)

Jump to

Keyboard shortcuts

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