package
0.0.6
Repository: https://github.com/nomango/gnostic.git
Documentation: pkg.go.dev

# README

Compiler support code

This directory contains compiler support code used by Gnostic and Gnostic extensions.

# Functions

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

# Structs

Context contains state of the compiler as it traverses a document.
Error represents compiler errors and their location in the document.
ErrorGroup is a container for groups of Error values.
ExtensionHandler describes a binary that is called by the compiler to handle specification extensions.