astnode

package
v0.25.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2018 License: Apache-2.0 Imports: 1 Imported by: 25

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AstNode

type AstNode interface {
	// ValueLineCol returns the line, column, and highlight string of the value of
	// this node in the source.
	ValueLineCol(source io.ReadSeeker) (int, int, string)

	// KeyLineCol returns the line, column, and highlight string of the key for the
	// value of this node in the source.
	KeyLineCol(source io.ReadSeeker) (int, int, string)

	// LiteralValue returns the value of this node.
	LiteralValue() interface{}

	// SliceChild returns the child node at the index specified. If this node is not
	// a slice node, an empty AstNode and false is returned.
	SliceChild(index int) (AstNode, bool)

	// KeyValueMap returns a map of keys and values. If this node is not a mapping
	// node, nil and false are returned.
	KeyValueMap() (map[string]AstNode, bool)

	// Tag returns the struct tag used in the config structure used to unmarshal.
	Tag() string
}

AstNode abstracts the differences between yaml and json nodes, providing a common interface

Jump to

Keyboard shortcuts

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