Documentation
¶
Index ¶
- Constants
- Variables
- func Execute(version, commit, date, builtBy string)
- func GoTemplateOutput(v interface{}) ([]byte, error)
- func HCL1Input(data []byte, v interface{}) error
- func HCL2Input(b []byte, v interface{}) error
- func Input(in []byte, format string) (interface{}, error)
- func JSONInput(data []byte, v interface{}) error
- func JSONOutput(v interface{}) ([]byte, error)
- func JSONPathOutput(v interface{}) ([]byte, error)
- func Output(obj interface{}, format string) ([]byte, error)
- func TOMLInput(data []byte, v interface{}) error
- func TOMLOutput(v interface{}) ([]byte, error)
- func YAMLInput(data []byte, v interface{}) error
- func YAMLOutput(v interface{}) ([]byte, error)
- type InputFuncMap
- type OutputFuncMap
Constants ¶
View Source
const DefaultGoTemplate = "{{.}}"
View Source
const DefaultJSONPathTemplate = "{}"
Variables ¶
View Source
var ( InputFuncs = InputFuncMap{ "json": JSONInput, "yaml": YAMLInput, "toml": TOMLInput, "hcl1": HCL1Input, "hcl2": HCL2Input, "hcl": HCL2Input, } OutputFuncs = OutputFuncMap{ "json": JSONOutput, "yaml": YAMLOutput, "toml": TOMLOutput, "go-template": GoTemplateOutput, "jsonpath": JSONPathOutput, } )
Functions ¶
func Execute ¶
func Execute(version, commit, date, builtBy string)
Execute is the entrypoint command
func GoTemplateOutput ¶
GoTemplateOutput renders a Go template. Supports Sprig and a few custom functions.
func JSONOutput ¶
func JSONPathOutput ¶
JSONPathOutput renders a JSONPath template given in Kubernetes CLI format. More information: https://kubernetes.io/docs/reference/kubectl/jsonpath/ TODO: https://github.com/kubernetes/kubernetes/blob/master/staging/src/k8s.io/kubectl/pkg/cmd/get/customcolumn.go
func TOMLOutput ¶
func YAMLOutput ¶
Types ¶
type InputFuncMap ¶
func (*InputFuncMap) Options ¶
func (m *InputFuncMap) Options() string
type OutputFuncMap ¶
func (*OutputFuncMap) Options ¶
func (m *OutputFuncMap) Options() string
Click to show internal directories.
Click to hide internal directories.