Documentation ¶
Overview ¶
Package compiler provides support functions to generated compiler code.
Index ¶
Constants ¶
This section is empty.
Variables ¶
var BoolForScalarNode = compiler.BoolForScalarNode
BoolForScalarNode returns the bool value of a node.
var CallExtension = compiler.CallExtension
CallExtension calls a binary extension handler.
var ClearCaches = compiler.ClearCaches
ClearCaches clears all caches.
var ClearFileCache = compiler.ClearFileCache
ClearFileCache clears the file cache.
var ClearInfoCache = compiler.ClearInfoCache
ClearInfoCache clears the info cache.
var ConvertInterfaceArrayToStringArray = compiler.ConvertInterfaceArrayToStringArray
ConvertInterfaceArrayToStringArray converts an array of interfaces to an array of strings, if possible.
var Description = compiler.Description
Description returns a human-readable represention of an item.
var DisableFileCache = compiler.DisableFileCache
DisableFileCache turns off file caching.
var DisableInfoCache = compiler.DisableInfoCache
DisableInfoCache turns off parsed info caching.
var Display = compiler.Display
Display returns a description of a node for use in error messages.
var EnableFileCache = compiler.EnableFileCache
EnableFileCache turns on file caching.
var EnableInfoCache = compiler.EnableInfoCache
EnableInfoCache turns on parsed info caching.
var FetchFile = compiler.FetchFile
FetchFile gets a specified file from the local filesystem or a remote location.
var FloatForScalarNode = compiler.FloatForScalarNode
FloatForScalarNode returns the float value of a node.
var GetInfoCache = compiler.GetInfoCache
GetInfoCache returns the info cache map.
var IntForScalarNode = compiler.IntForScalarNode
IntForScalarNode returns the integer value of a node.
var InvalidKeysInMap = compiler.InvalidKeysInMap
InvalidKeysInMap returns keys in a map that don't match a list of allowed keys and patterns.
var MapHasKey = compiler.MapHasKey
MapHasKey returns true if a yamlv2.MapSlice contains a specified key.
var MapValueForKey = compiler.MapValueForKey
MapValueForKey gets the value of a map value for a specified key.
var Marshal = compiler.Marshal
Marshal creates a yaml version of a structure in our preferred style
var MissingKeysInMap = compiler.MissingKeysInMap
MissingKeysInMap identifies which keys from a list of required keys are not in a map.
var NewContext = compiler.NewContext
NewContext returns a new object representing the compiler state
var NewContextWithExtensions = compiler.NewContextWithExtensions
NewContextWithExtensions returns a new object representing the compiler state
var NewError = compiler.NewError
NewError creates an Error.
var NewErrorGroupOrNil = compiler.NewErrorGroupOrNil
NewErrorGroupOrNil returns a new ErrorGroup for a slice of errors or nil if the slice is empty.
var NewMappingNode = compiler.NewMappingNode
NewMappingNode creates a new Mapping node.
var NewNullNode = compiler.NewNullNode
NewNullNode creates a new Null node.
var NewScalarNodeForBool = compiler.NewScalarNodeForBool
NewScalarNodeForBool creates a new node to hold a bool.
var NewScalarNodeForFloat = compiler.NewScalarNodeForFloat
NewScalarNodeForFloat creates a new node to hold a float.
var NewScalarNodeForInt = compiler.NewScalarNodeForInt
NewScalarNodeForInt creates a new node to hold an integer.
var NewScalarNodeForString = compiler.NewScalarNodeForString
NewScalarNodeForString creates a new node to hold a string.
var NewSequenceNode = compiler.NewSequenceNode
NewSequenceNode creates a new Sequence node.
var NewSequenceNodeForStringArray = compiler.NewSequenceNodeForStringArray
NewSequenceNodeForStringArray creates a new node to hold an array of strings.
var PluralProperties = compiler.PluralProperties
PluralProperties returns the string "properties" pluralized.
var ReadBytesForFile = compiler.ReadBytesForFile
ReadBytesForFile reads the bytes of a file.
var ReadInfoForRef = compiler.ReadInfoForRef
ReadInfoForRef reads a file and return the fragment needed to resolve a $ref.
var ReadInfoFromBytes = compiler.ReadInfoFromBytes
ReadInfoFromBytes unmarshals a file as a *yaml.Node.
var RemoveFromFileCache = compiler.RemoveFromFileCache
RemoveFromFileCache removes an entry from the file cache.
var RemoveFromInfoCache = compiler.RemoveFromInfoCache
RemoveFromInfoCache removes an entry from the info cache.
var SequenceNodeForNode = compiler.SequenceNodeForNode
SequenceNodeForNode returns a node if it is a SequenceNode.
var SortedKeysForMap = compiler.SortedKeysForMap
SortedKeysForMap returns the sorted keys of a yamlv2.MapSlice.
var StringArrayContainsValue = compiler.StringArrayContainsValue
StringArrayContainsValue returns true if a string array contains a specified value.
var StringArrayContainsValues = compiler.StringArrayContainsValues
StringArrayContainsValues returns true if a string array contains all of a list of specified values.
var StringArrayForSequenceNode = compiler.StringArrayForSequenceNode
StringArrayForSequenceNode converts a sequence node to an array of strings, if possible.
var StringForScalarNode = compiler.StringForScalarNode
StringForScalarNode returns the string value of a node.
var StringValue = compiler.StringValue
StringValue returns the string value of an item.
var UnpackMap = compiler.UnpackMap
UnpackMap gets a *yaml.Node if possible.
Functions ¶
This section is empty.
Types ¶
type ErrorGroup ¶
type ErrorGroup = compiler.ErrorGroup
ErrorGroup is a container for groups of Error values.
type ExtensionHandler ¶
type ExtensionHandler = compiler.ExtensionHandler
ExtensionHandler describes a binary that is called by the compiler to handle specification extensions.