yamltemplate

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Mar 1, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	AnnotationMapKeyOverride structmeta.AnnotationName = "yaml/map-key-override"
)
View Source
const (
	EvaluationCtxDialectName template.EvaluationCtxDialectName = "yaml"
)

Variables

This section is empty.

Functions

func NewStructMetaFromMeta

func NewStructMetaFromMeta(meta *yamlmeta.Meta) (structmeta.Meta, error)

Types

type EvaluationCtx

type EvaluationCtx struct{}

func (EvaluationCtx) PrepareNode

func (e EvaluationCtx) PrepareNode(
	parentNode template.EvaluationNode, val template.EvaluationNode) error

func (EvaluationCtx) Replace

func (e EvaluationCtx) Replace(
	parentNodes []template.EvaluationNode, val interface{}) error

func (EvaluationCtx) ShouldWrapRootValue

func (e EvaluationCtx) ShouldWrapRootValue(nodeVal interface{}) bool

func (EvaluationCtx) WrapRootValue

func (e EvaluationCtx) WrapRootValue(val interface{}) interface{}

type MapItemOverride

type MapItemOverride struct{}

func (MapItemOverride) Apply

func (d MapItemOverride) Apply(
	typedMap *yamlmeta.Map, newItem *yamlmeta.MapItem) error

type MetaAndAnnotation

type MetaAndAnnotation struct {
	Meta       *yamlmeta.Meta
	Annotation *structmeta.Annotation
}

type Metas

type Metas struct {
	Block       []*yamlmeta.Meta // meant to execute some code
	Values      []*yamlmeta.Meta // meant to return interpolated value
	Annotations []MetaAndAnnotation
	// contains filtered or unexported fields
}

func NewMetas

func NewMetas(node yamlmeta.Node) (Metas, error)

func (Metas) NeedsEnd

func (m Metas) NeedsEnd() bool

type StarlarkFragment

type StarlarkFragment struct {
	// contains filtered or unexported fields
}

func NewStarlarkFragment

func NewStarlarkFragment(data interface{}) *StarlarkFragment

func (*StarlarkFragment) AsGoValue

func (s *StarlarkFragment) AsGoValue() interface{}

func (*StarlarkFragment) AsStarlarkValue

func (s *StarlarkFragment) AsStarlarkValue() starlark.Value

func (*StarlarkFragment) Freeze

func (s *StarlarkFragment) Freeze()

func (*StarlarkFragment) Hash

func (s *StarlarkFragment) Hash() (uint32, error)

func (*StarlarkFragment) String

func (s *StarlarkFragment) String() string

func (*StarlarkFragment) Truth

func (s *StarlarkFragment) Truth() starlark.Bool

func (*StarlarkFragment) Type

func (s *StarlarkFragment) Type() string

type Template

type Template struct {
	// contains filtered or unexported fields
}

func NewTemplate

func NewTemplate(name string) *Template

func (*Template) Compile

func (e *Template) Compile(docSet *yamlmeta.DocumentSet) (*template.CompiledTemplate, error)

Jump to

Keyboard shortcuts

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