Documentation
¶
Index ¶
- func FormatJsonnet() jsonnet.NativeFunction
- func Manifest(elem any) (string, error)
- func ManifestJsonnet() jsonnet.NativeFunction
- func MarshalNode(node ast.Node) ([]byte, error)
- func Parse(val string) (any, error)
- func ParseJsonnet() jsonnet.NativeFunction
- func Plugin(opts ...jpoet.PluginOption) *jpoet.Plugin
- func UnmarshalNode(data []byte) (ast.Node, error)
- type Apply
- type ApplyBrace
- type Arguments
- type Array
- type ArrayComp
- type Assert
- type Binary
- type CommaSeparatedExpr
- type Conditional
- type Dollar
- type Error
- type Fodder
- type FodderElement
- type ForSpec
- type Function
- type IfSpec
- type Import
- type ImportBin
- type ImportStr
- type InSuper
- type Index
- type LiteralBoolean
- type LiteralNull
- type LiteralNumber
- type LiteralString
- type Local
- type LocalBind
- type Location
- type LocationRange
- type NamedArgument
- type Node
- type Object
- type ObjectComp
- type ObjectField
- type Parameter
- type Parens
- type ProxyApply
- type ProxyApplyBrace
- type ProxyArguments
- type ProxyArray
- type ProxyArrayComp
- type ProxyAssert
- type ProxyBinary
- type ProxyCommaSeparatedExpr
- type ProxyConditional
- type ProxyDollar
- type ProxyError
- type ProxyFodderElement
- type ProxyForSpec
- type ProxyFunction
- type ProxyIfSpec
- type ProxyImport
- type ProxyImportBin
- type ProxyImportStr
- type ProxyInSuper
- type ProxyIndex
- type ProxyLiteralBoolean
- type ProxyLiteralNull
- type ProxyLiteralNumber
- type ProxyLiteralString
- type ProxyLocal
- type ProxyLocalBind
- type ProxyLocation
- type ProxyLocationRange
- type ProxyNamedArgument
- type ProxyNodeBase
- type ProxyObject
- type ProxyObjectComp
- type ProxyObjectField
- type ProxyParameter
- type ProxyParens
- type ProxySelf
- type ProxySlice
- type ProxySource
- type ProxySuperIndex
- type ProxyUnary
- type ProxyVar
- type Self
- type Slice
- type Source
- type SuperIndex
- type Unary
- type Var
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func FormatJsonnet ¶
func FormatJsonnet() jsonnet.NativeFunction
func ManifestJsonnet ¶
func ManifestJsonnet() jsonnet.NativeFunction
func ParseJsonnet ¶
func ParseJsonnet() jsonnet.NativeFunction
Types ¶
type ApplyBrace ¶
type ApplyBrace ast.ApplyBrace
func (ApplyBrace) MarshalJSON ¶
func (a ApplyBrace) MarshalJSON() ([]byte, error)
func (*ApplyBrace) UnmarshalJSON ¶
func (a *ApplyBrace) UnmarshalJSON(data []byte) error
type CommaSeparatedExpr ¶
type CommaSeparatedExpr ast.CommaSeparatedExpr
func (CommaSeparatedExpr) MarshalJSON ¶
func (c CommaSeparatedExpr) MarshalJSON() ([]byte, error)
func (*CommaSeparatedExpr) UnmarshalJSON ¶
func (c *CommaSeparatedExpr) UnmarshalJSON(data []byte) error
type Conditional ¶
type Conditional ast.Conditional
func (Conditional) MarshalJSON ¶
func (c Conditional) MarshalJSON() ([]byte, error)
func (*Conditional) UnmarshalJSON ¶
func (c *Conditional) UnmarshalJSON(data []byte) error
type Fodder ¶
type Fodder []FodderElement
type FodderElement ¶
type FodderElement ast.FodderElement
func (FodderElement) MarshalJSON ¶
func (f FodderElement) MarshalJSON() ([]byte, error)
func (*FodderElement) UnmarshalJSON ¶
func (f *FodderElement) UnmarshalJSON(data []byte) error
type LiteralBoolean ¶
type LiteralBoolean ast.LiteralBoolean
func (LiteralBoolean) MarshalJSON ¶
func (l LiteralBoolean) MarshalJSON() ([]byte, error)
func (*LiteralBoolean) UnmarshalJSON ¶
func (l *LiteralBoolean) UnmarshalJSON(data []byte) error
type LiteralNull ¶
type LiteralNull ast.LiteralNull
func (LiteralNull) MarshalJSON ¶
func (l LiteralNull) MarshalJSON() ([]byte, error)
func (*LiteralNull) UnmarshalJSON ¶
func (l *LiteralNull) UnmarshalJSON(data []byte) error
type LiteralNumber ¶
type LiteralNumber ast.LiteralNumber
func (LiteralNumber) MarshalJSON ¶
func (l LiteralNumber) MarshalJSON() ([]byte, error)
func (*LiteralNumber) UnmarshalJSON ¶
func (l *LiteralNumber) UnmarshalJSON(data []byte) error
type LiteralString ¶
type LiteralString ast.LiteralString
func (LiteralString) MarshalJSON ¶
func (l LiteralString) MarshalJSON() ([]byte, error)
func (*LiteralString) UnmarshalJSON ¶
func (l *LiteralString) UnmarshalJSON(data []byte) error
type LocationRange ¶
type LocationRange ast.LocationRange
func NewLocationRange ¶
func NewLocationRange(locationRange ast.LocationRange) LocationRange
func (LocationRange) LocationRange ¶
func (l LocationRange) LocationRange() ast.LocationRange
func (LocationRange) MarshalJSON ¶
func (l LocationRange) MarshalJSON() ([]byte, error)
func (*LocationRange) UnmarshalJSON ¶
func (l *LocationRange) UnmarshalJSON(data []byte) error
type NamedArgument ¶
type NamedArgument ast.NamedArgument
func (NamedArgument) MarshalJSON ¶
func (n NamedArgument) MarshalJSON() ([]byte, error)
func (*NamedArgument) UnmarshalJSON ¶
func (n *NamedArgument) UnmarshalJSON(data []byte) error
type ObjectComp ¶
type ObjectComp ast.ObjectComp
func (ObjectComp) MarshalJSON ¶
func (o ObjectComp) MarshalJSON() ([]byte, error)
func (*ObjectComp) UnmarshalJSON ¶
func (o *ObjectComp) UnmarshalJSON(data []byte) error
type ObjectField ¶
type ObjectField ast.ObjectField
func (ObjectField) MarshalJSON ¶
func (o ObjectField) MarshalJSON() ([]byte, error)
func (*ObjectField) UnmarshalJSON ¶
func (o *ObjectField) UnmarshalJSON(data []byte) error
type ProxyApply ¶
type ProxyApply struct {
Kind string `json:"__kind__"`
Target Node `json:"target"`
FodderLeft Fodder `json:"fodderLeft"`
Arguments Arguments `json:"arguments"`
FodderRight Fodder `json:"fodderRight"`
TailStrictFodder Fodder `json:"tailStrictFodder"`
ProxyNodeBase
TrailingComma bool `json:"trailingComma"`
TailStrict bool `json:"tailStrict"`
}
type ProxyApplyBrace ¶
type ProxyApplyBrace struct {
Kind string `json:"__kind__"`
Left Node `json:"left"`
Right Node `json:"right"`
ProxyNodeBase
}
type ProxyArguments ¶
type ProxyArguments struct {
Positional []CommaSeparatedExpr `json:"positional"`
Named []NamedArgument `json:"named"`
}
type ProxyArray ¶
type ProxyArray struct {
Kind string `json:"__kind__"`
Elements []CommaSeparatedExpr `json:"elements"`
CloseFodder Fodder `json:"closeFodder"`
ProxyNodeBase
TrailingComma bool `json:"trailingComma"`
}
type ProxyArrayComp ¶
type ProxyAssert ¶
type ProxyBinary ¶
type ProxyCommaSeparatedExpr ¶
type ProxyConditional ¶
type ProxyDollar ¶
type ProxyDollar struct {
Kind string `json:"__kind__"`
ProxyNodeBase
}
type ProxyError ¶
type ProxyError struct {
Kind string `json:"__kind__"`
Expr Node `json:"expr"`
ProxyNodeBase
}
type ProxyFodderElement ¶
type ProxyFodderElement struct {
Comment []string `json:"comment"`
Kind ast.FodderKind `json:"kind"`
Blanks int `json:"blanks"`
Indent int `json:"indent"`
}
type ProxyForSpec ¶
type ProxyFunction ¶
type ProxyIfSpec ¶
type ProxyImport ¶
type ProxyImport struct {
Kind string `json:"__kind__"`
File *ast.LiteralString `json:"file"`
ProxyNodeBase
}
type ProxyImportBin ¶
type ProxyImportBin struct {
Kind string `json:"__kind__"`
File *ast.LiteralString `json:"file"`
ProxyNodeBase
}
type ProxyImportStr ¶
type ProxyImportStr struct {
Kind string `json:"__kind__"`
File *ast.LiteralString `json:"file"`
ProxyNodeBase
}
type ProxyInSuper ¶
type ProxyInSuper struct {
Kind string `json:"__kind__"`
Index Node `json:"index"`
InFodder Fodder `json:"inFodder"`
SuperFodder Fodder `json:"superFodder"`
ProxyNodeBase
}
type ProxyIndex ¶
type ProxyIndex struct {
Kind string `json:"__kind__"`
Target Node `json:"target"`
Index Node `json:"index"`
RightBracketFodder Fodder `json:"rightBracketFodder"`
LeftBracketFodder Fodder `json:"leftBracketFodder"`
Id *ast.Identifier `json:"id"`
ProxyNodeBase
}
type ProxyLiteralBoolean ¶
type ProxyLiteralBoolean struct {
Kind string `json:"__kind__"`
Value bool `json:"value"`
ProxyNodeBase
}
type ProxyLiteralNull ¶
type ProxyLiteralNull struct {
Kind string `json:"__kind__"`
ProxyNodeBase
}
type ProxyLiteralNumber ¶
type ProxyLiteralNumber struct {
Kind string `json:"__kind__"`
OriginalString string `json:"originalString"`
ProxyNodeBase
}
type ProxyLiteralString ¶
type ProxyLiteralString struct {
NodeKind string `json:"__kind__"`
Value string `json:"value"`
BlockIndent string `json:"blockIndent"`
BlockTermIndent string `json:"blockTermIndent"`
ProxyNodeBase
Kind ast.LiteralStringKind `json:"kind"`
}
type ProxyLocal ¶
type ProxyLocal struct {
Kind string `json:"__kind__"`
Binds []LocalBind `json:"binds"`
Body Node `json:"body"`
ProxyNodeBase
}
type ProxyLocalBind ¶
type ProxyLocation ¶
type ProxyLocationRange ¶
type ProxyNamedArgument ¶
type ProxyNodeBase ¶
type ProxyNodeBase struct {
Fodder Fodder `json:"fodder"`
Ctx ast.Context `json:"context"`
FreeVars ast.Identifiers `json:"freeVars"`
LocRange LocationRange `json:"locRange"`
}
func NewProxyNodeBase ¶
func NewProxyNodeBase(n ast.NodeBase) ProxyNodeBase
func (ProxyNodeBase) NodeBase ¶
func (p ProxyNodeBase) NodeBase() ast.NodeBase
type ProxyObject ¶
type ProxyObject struct {
Kind string `json:"__kind__"`
Fields []ObjectField `json:"fields"`
CloseFodder Fodder `json:"closeFodder"`
ProxyNodeBase
TrailingComma bool `json:"trailingComma"`
}
type ProxyObjectComp ¶
type ProxyObjectComp struct {
Kind string `json:"__kind__"`
Fields []ObjectField `json:"fields"`
TrailingCommaFodder Fodder `json:"trailingCommaFodder"`
CloseFodder Fodder `json:"closeFodder"`
Spec ForSpec `json:"spec"`
ProxyNodeBase
TrailingComma bool `json:"trailingComma"`
}
type ProxyObjectField ¶
type ProxyObjectField struct {
NodeKind string `json:"__kind__"`
Method *Function `json:"method"`
Id *ast.Identifier `json:"id"`
Fodder2 Fodder `json:"fodder2"`
Fodder1 Fodder `json:"fodder1"`
OpFodder Fodder `json:"opFodder"`
CommaFodder Fodder `json:"commaFodder"`
Expr1 Node `json:"expr1"`
Expr2 Node `json:"expr2"`
Expr3 Node `json:"expr3"`
LocRange ast.LocationRange `json:"locRange"`
Kind ast.ObjectFieldKind `json:"kind"`
Hide ast.ObjectFieldHide
SuperSugar bool
}
type ProxyParameter ¶
type ProxyParameter struct {
Kind string `json:"__kind__"`
NameFodder Fodder `json:"nameFodder"`
Name ast.Identifier `json:"name"`
CommaFodder Fodder `json:"commaFodder"`
EqFodder Fodder `json:"eqFodder"`
DefaultArg Node `json:"defaultArg"`
LocRange ast.LocationRange `json:"locRange"`
}
type ProxyParens ¶
type ProxyParens struct {
Kind string `json:"__kind__"`
Inner Node `json:"inner"`
CloseFodder Fodder `json:"closeFodder"`
ProxyNodeBase
}
type ProxySelf ¶
type ProxySelf struct {
Kind string `json:"__kind__"`
ProxyNodeBase
}
type ProxySlice ¶
type ProxySlice struct {
Kind string `json:"__kind__"`
Target Node `json:"target"`
LeftBracketFodder Fodder `json:"leftBracketFodder"`
BeginIndex Node `json:"beginIndex"`
EndColonFodder Fodder `json:"endColonFodder"`
EndIndex Node `json:"endIndex"`
StepColonFodder Fodder `json:"stepColonFodder"`
Step Node `json:"step"`
RightBracketFodder Fodder `json:"rightBracketFodder"`
ProxyNodeBase
}
type ProxySource ¶
type ProxySource struct {
DiagnosticFileName ast.DiagnosticFileName `json:"diagnosticFileName"`
Lines []string `json:"lines"`
}
type ProxySuperIndex ¶
type ProxySuperIndex struct {
Kind string `json:"__kind__"`
IDFodder Fodder `json:"idFodder"`
Index Node `json:"index"`
DotFodder Fodder `json:"dotFodder"`
Id *ast.Identifier `json:"id"`
ProxyNodeBase
}
type ProxyUnary ¶
type ProxyUnary struct {
Kind string `json:"__kind__"`
Expr Node `json:"expr"`
ProxyNodeBase
Op ast.UnaryOp `json:"op"`
}
type ProxyVar ¶
type ProxyVar struct {
Kind string `json:"__kind__"`
Id ast.Identifier `json:"id"`
ProxyNodeBase
}
type SuperIndex ¶
type SuperIndex ast.SuperIndex
func (SuperIndex) MarshalJSON ¶
func (s SuperIndex) MarshalJSON() ([]byte, error)
func (*SuperIndex) UnmarshalJSON ¶
func (s *SuperIndex) UnmarshalJSON(data []byte) error
Click to show internal directories.
Click to hide internal directories.