compiler

package
v0.7.0 Latest Latest
Warning

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

Go to latest
Published: Aug 25, 2023 License: Apache-2.0 Imports: 1 Imported by: 33

README

Compiler support code

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

Documentation

Overview

Package compiler provides support functions to generated compiler code.

Index

Constants

This section is empty.

Variables

View Source
var BoolForScalarNode = compiler.BoolForScalarNode

BoolForScalarNode returns the bool value of a node.

View Source
var CallExtension = compiler.CallExtension

CallExtension calls a binary extension handler.

View Source
var ClearCaches = compiler.ClearCaches

ClearCaches clears all caches.

View Source
var ClearFileCache = compiler.ClearFileCache

ClearFileCache clears the file cache.

View Source
var ClearInfoCache = compiler.ClearInfoCache

ClearInfoCache clears the info cache.

View Source
var ConvertInterfaceArrayToStringArray = compiler.ConvertInterfaceArrayToStringArray

ConvertInterfaceArrayToStringArray converts an array of interfaces to an array of strings, if possible.

View Source
var Description = compiler.Description

Description returns a human-readable represention of an item.

View Source
var DisableFileCache = compiler.DisableFileCache

DisableFileCache turns off file caching.

View Source
var DisableInfoCache = compiler.DisableInfoCache

DisableInfoCache turns off parsed info caching.

View Source
var Display = compiler.Display

Display returns a description of a node for use in error messages.

View Source
var EnableFileCache = compiler.EnableFileCache

EnableFileCache turns on file caching.

View Source
var EnableInfoCache = compiler.EnableInfoCache

EnableInfoCache turns on parsed info caching.

View Source
var FetchFile = compiler.FetchFile

FetchFile gets a specified file from the local filesystem or a remote location.

View Source
var FloatForScalarNode = compiler.FloatForScalarNode

FloatForScalarNode returns the float value of a node.

View Source
var GetInfoCache = compiler.GetInfoCache

GetInfoCache returns the info cache map.

View Source
var IntForScalarNode = compiler.IntForScalarNode

IntForScalarNode returns the integer value of a node.

View Source
var InvalidKeysInMap = compiler.InvalidKeysInMap

InvalidKeysInMap returns keys in a map that don't match a list of allowed keys and patterns.

View Source
var MapHasKey = compiler.MapHasKey

MapHasKey returns true if a yamlv2.MapSlice contains a specified key.

View Source
var MapValueForKey = compiler.MapValueForKey

MapValueForKey gets the value of a map value for a specified key.

View Source
var Marshal = compiler.Marshal

Marshal creates a yaml version of a structure in our preferred style

View Source
var MissingKeysInMap = compiler.MissingKeysInMap

MissingKeysInMap identifies which keys from a list of required keys are not in a map.

View Source
var NewContext = compiler.NewContext

NewContext returns a new object representing the compiler state

View Source
var NewContextWithExtensions = compiler.NewContextWithExtensions

NewContextWithExtensions returns a new object representing the compiler state

View Source
var NewError = compiler.NewError

NewError creates an Error.

View Source
var NewErrorGroupOrNil = compiler.NewErrorGroupOrNil

NewErrorGroupOrNil returns a new ErrorGroup for a slice of errors or nil if the slice is empty.

View Source
var NewMappingNode = compiler.NewMappingNode

NewMappingNode creates a new Mapping node.

View Source
var NewNullNode = compiler.NewNullNode

NewNullNode creates a new Null node.

View Source
var NewScalarNodeForBool = compiler.NewScalarNodeForBool

NewScalarNodeForBool creates a new node to hold a bool.

View Source
var NewScalarNodeForFloat = compiler.NewScalarNodeForFloat

NewScalarNodeForFloat creates a new node to hold a float.

View Source
var NewScalarNodeForInt = compiler.NewScalarNodeForInt

NewScalarNodeForInt creates a new node to hold an integer.

View Source
var NewScalarNodeForString = compiler.NewScalarNodeForString

NewScalarNodeForString creates a new node to hold a string.

View Source
var NewSequenceNode = compiler.NewSequenceNode

NewSequenceNode creates a new Sequence node.

View Source
var NewSequenceNodeForStringArray = compiler.NewSequenceNodeForStringArray

NewSequenceNodeForStringArray creates a new node to hold an array of strings.

View Source
var PluralProperties = compiler.PluralProperties

PluralProperties returns the string "properties" pluralized.

View Source
var ReadBytesForFile = compiler.ReadBytesForFile

ReadBytesForFile reads the bytes of a file.

View Source
var ReadInfoForRef = compiler.ReadInfoForRef

ReadInfoForRef reads a file and return the fragment needed to resolve a $ref.

View Source
var ReadInfoFromBytes = compiler.ReadInfoFromBytes

ReadInfoFromBytes unmarshals a file as a *yaml.Node.

View Source
var RemoveFromFileCache = compiler.RemoveFromFileCache

RemoveFromFileCache removes an entry from the file cache.

View Source
var RemoveFromInfoCache = compiler.RemoveFromInfoCache

RemoveFromInfoCache removes an entry from the info cache.

View Source
var SequenceNodeForNode = compiler.SequenceNodeForNode

SequenceNodeForNode returns a node if it is a SequenceNode.

View Source
var SortedKeysForMap = compiler.SortedKeysForMap

SortedKeysForMap returns the sorted keys of a yamlv2.MapSlice.

View Source
var StringArrayContainsValue = compiler.StringArrayContainsValue

StringArrayContainsValue returns true if a string array contains a specified value.

View Source
var StringArrayContainsValues = compiler.StringArrayContainsValues

StringArrayContainsValues returns true if a string array contains all of a list of specified values.

View Source
var StringArrayForSequenceNode = compiler.StringArrayForSequenceNode

StringArrayForSequenceNode converts a sequence node to an array of strings, if possible.

View Source
var StringForScalarNode = compiler.StringForScalarNode

StringForScalarNode returns the string value of a node.

View Source
var StringValue = compiler.StringValue

StringValue returns the string value of an item.

View Source
var UnpackMap = compiler.UnpackMap

UnpackMap gets a *yaml.Node if possible.

Functions

This section is empty.

Types

type Context

type Context = compiler.Context

Context contains state of the compiler as it traverses a document.

type Error

type Error = compiler.Error

Error represents compiler errors and their location in the document.

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.

Jump to

Keyboard shortcuts

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