Documentation ¶
Index ¶
- func GenericMapToNode(mapValue reflect.Value) (*yaml.Node, error)
- func GenericSliceToNode(slice reflect.Value) (*yaml.Node, error)
- func NodeToBool(node *yaml.Node) (bool, bool)
- func NodeToFloat(node *yaml.Node) (float64, bool)
- func NodeToInt(node *yaml.Node) (int, bool)
- func NodeToInterface(node *yaml.Node) (interface{}, bool)
- func NodeToMap(node *yaml.Node) (map[string]interface{}, bool)
- func NodeToScalarInterface(node *yaml.Node) (interface{}, bool)
- func NodeToSlice(node *yaml.Node) ([]interface{}, bool)
- func NodeToString(node *yaml.Node) (string, bool)
- func ValueToNode(value interface{}) (*yaml.Node, error)
- type Interpreter
- func (ei *Interpreter) CreateDecoder(target interface{}) *interpretHelper
- func (ei *Interpreter) CreateRawDecoder(target *yaml.Node) *rawInterpretHelper
- func (ei *Interpreter) LookupAll(jsonPath string) (*yaml.Node, error)
- func (ei *Interpreter) LookupFirst(jsonPath string) (*yaml.Node, error)
- func (ei *Interpreter) Process(node *yaml.Node) (*yaml.Node, error)
- func (ei *Interpreter) RegisterTag(tag string, f func(node *yaml.Node) (*yaml.Node, error)) error
- type InterpreterOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GenericMapToNode ¶
func GenericSliceToNode ¶
func NodeToBool ¶
NodeToBool parses a YAML node to bool.
func NodeToFloat ¶
NodeToFloat parses a YAML node to float.
func NodeToInterface ¶
func NodeToInterface(node *yaml.Node) (interface{}, bool)
NodeToInterface parses a YAML node into an interface{}.
func NodeToScalarInterface ¶
func NodeToScalarInterface(node *yaml.Node) (interface{}, bool)
func NodeToSlice ¶
func NodeToSlice(node *yaml.Node) ([]interface{}, bool)
func NodeToString ¶
NodeToString parses a YAML node to string.
func ValueToNode ¶
func ValueToNode(value interface{}) (*yaml.Node, error)
Types ¶
type Interpreter ¶
type Interpreter struct {
// contains filtered or unexported fields
}
func NewInterpreter ¶
func NewInterpreter(options ...InterpreterOption) (*Interpreter, error)
func (*Interpreter) CreateDecoder ¶
func (ei *Interpreter) CreateDecoder(target interface{}) *interpretHelper
func (*Interpreter) CreateRawDecoder ¶
func (ei *Interpreter) CreateRawDecoder(target *yaml.Node) *rawInterpretHelper
func (*Interpreter) LookupAll ¶
func (ei *Interpreter) LookupAll(jsonPath string) (*yaml.Node, error)
func (*Interpreter) LookupFirst ¶
func (ei *Interpreter) LookupFirst(jsonPath string) (*yaml.Node, error)
func (*Interpreter) Process ¶
func (ei *Interpreter) Process(node *yaml.Node) (*yaml.Node, error)
func (*Interpreter) RegisterTag ¶
func (ei *Interpreter) RegisterTag(tag string, f func(node *yaml.Node) (*yaml.Node, error)) error
type InterpreterOption ¶
type InterpreterOption func(*Interpreter) error
func WithAdditionalTags ¶
func WithAdditionalTags(tags map[string]func(node *yaml.Node) (*yaml.Node, error)) InterpreterOption
func WithFuncMap ¶
func WithFuncMap(funcmap ...template.FuncMap) InterpreterOption
func WithVars ¶
func WithVars(vars map[string]interface{}) InterpreterOption
Click to show internal directories.
Click to hide internal directories.