Documentation ¶
Index ¶
- Constants
- Variables
- func Base64Encode(data []byte, max int) string
- func CatchEvaluationError(result *interface{}, info *EvaluationInfo, ok *bool, msgfmt string, ...)
- func DiffIP(a, b net.IP) int64
- func EmptyError() string
- func EvalValidationExpression(value interface{}, cond yaml.Node, binding Binding) (bool, string, error, bool)
- func ExpressionType(elem interface{}) string
- func IPAdd(ip net.IP, offset int64) net.IP
- func IsDNS1035Label(value string) []string
- func IsDNS1123Label(value string) []string
- func IsDNS1123Subdomain(value string) []string
- func IsListExpansion(e Expression) bool
- func IsWildcardDNS1123Subdomain(value string) []string
- func MakeStringList(list []string, info EvaluationInfo) []yaml.Node
- func MaxIP(cidr *net.IPNet) net.IP
- func MaxLenError(length int) string
- func NewNode(val interface{}, src SourceProvider) yaml.Node
- func NumberOperands(a, b interface{}) (interface{}, interface{}, error)
- func NumberOperandsN(convert int, ops ...interface{}) ([]interface{}, bool, error)
- func PathComponents(ref string, leading bool) []string
- func RaiseEvaluationError(resolved bool, info EvaluationInfo, ok bool)
- func RaiseEvaluationErrorf(format string, args ...interface{})
- func RegexError(msg string, fmt string, examples ...string) string
- func RegisterFunction(name string, f Function)
- func RegisterValidator(name string, f Validator)
- func ReloadEnv()
- func ReplaceRegExp(str string, src string, dst interface{}, cnt int, binding Binding) (bool, string, error)
- func ReplaceString(str string, src string, dst interface{}, cnt int, binding Binding) (bool, string, error)
- func ResetUnresolvedNodes(root yaml.Node) yaml.Node
- func SimpleValidatorResult(r bool, t, f string, args ...interface{}) (bool, string, error, bool)
- func StringValue(msg string, v interface{}) (string, error)
- func SubIP(ip net.IP, mask net.IPMask) net.IP
- func ValidatorErrorf(msgfmt string, args ...interface{}) (bool, string, error, bool)
- func ValidatorResult(r bool, msgfmt string, args ...interface{}) (bool, string, error, bool)
- func ValueAsString(val interface{}, all bool) string
- type AdditionExpr
- type Assignment
- type AutoExpr
- type Binding
- type BooleanExpr
- type Bytes
- type CallExpr
- type CatchExpr
- type Cleanup
- type ComparisonExpr
- type ConcatenationExpr
- type CondExpr
- type CreateMapExpr
- type DefaultExpr
- type DivisionExpr
- type DynamicExpr
- type DynamlGrammar
- type EvaluationError
- type EvaluationInfo
- func DefaultInfo() EvaluationInfo
- func ParseData(file string, data []byte, mode string, binding Binding) (interface{}, EvaluationInfo, bool)
- func ResolveExpressionListOrPushEvaluation(list *[]Expression, resolved *bool, info *EvaluationInfo, binding Binding, ...) ([]interface{}, EvaluationInfo, bool)
- func ResolveExpressionOrPushEvaluation(e *Expression, resolved *bool, info *EvaluationInfo, binding Binding, ...) (interface{}, EvaluationInfo, bool)
- func ResolveIntegerExpressionOrPushEvaluation(e *Expression, resolved *bool, info *EvaluationInfo, binding Binding, ...) (int64, EvaluationInfo, bool)
- func (i *EvaluationInfo) AnnotateError(err EvaluationInfo, msgfmt interface{}, args ...interface{}) (interface{}, EvaluationInfo, bool)
- func (i EvaluationInfo) CleanError() EvaluationInfo
- func (i *EvaluationInfo) Cleanup() error
- func (i *EvaluationInfo) DenyOSOperation(name string) (interface{}, EvaluationInfo, bool)
- func (i *EvaluationInfo) Error(msgfmt interface{}, args ...interface{}) (interface{}, EvaluationInfo, bool)
- func (i EvaluationInfo) Join(o EvaluationInfo) EvaluationInfo
- func (i *EvaluationInfo) PropagateError(value interface{}, state Status, msgfmt string, args ...interface{}) (interface{}, EvaluationInfo, bool)
- func (i *EvaluationInfo) SetError(msgfmt interface{}, args ...interface{})
- func (e EvaluationInfo) SourceName() string
- type Expander
- type Expression
- type ExpressionParseError
- type FileEntry
- type Finder
- type FloatExpr
- type Function
- type GroupedExpr
- type IPRange
- type IntegerExpr
- type LambdaExpr
- type LambdaRefExpr
- type LambdaValue
- func (e LambdaValue) EquivalentTo(val interface{}) bool
- func (e LambdaValue) Evaluate(inline bool, curry, autocurry bool, nargs map[string]yaml.Node, ...) (bool, interface{}, EvaluationInfo, bool)
- func (e LambdaValue) MarshalYAML() (tag string, value interface{}, err error)
- func (e LambdaValue) NumOptional() int
- func (e LambdaValue) ParameterIndex(name string) int
- func (e LambdaValue) SetStaticResolver(binding Binding) StaticallyScopedValue
- func (e LambdaValue) StaticResolver() Binding
- func (e LambdaValue) String() string
- type Less
- type ListExpansion
- type ListExpansionExpr
- type ListExpr
- type LogAndExpr
- type LogOrExpr
- type Mapper
- type MappingAggregation
- type MappingContext
- type MappingExpr
- type MarkerExpr
- func (e MarkerExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
- func (e MarkerExpr) GetFlags() yaml.NodeFlags
- func (e MarkerExpr) Has(t string) bool
- func (e MarkerExpr) MarshalYAML() (tag string, value interface{}, err error)
- func (e MarkerExpr) String() string
- func (e MarkerExpr) TemplateExpression(orig yaml.Node) yaml.Node
- type MarkerExpressionExpr
- type MergeExpr
- type ModuloExpr
- type MultiplicationExpr
- type NameArgument
- type NilExpr
- type NotExpr
- type OrExpr
- type Parameter
- type PreferExpr
- type ProjectionExpr
- type ProjectionValue
- type ProjectionValueExpr
- type QualifiedExpr
- type RangeExpr
- type ReferenceExpr
- type Registry
- type ScopeExpr
- type SliceExpr
- type SourceProvider
- type State
- type StaticallyScopedValue
- type Status
- type StringExpr
- type SubstitutionExpr
- type SubtractionExpr
- type SumExpr
- type SyncExpr
- type TemplateValue
- func (e TemplateValue) EquivalentTo(val interface{}) bool
- func (e TemplateValue) MarshalYAML() (tag string, value interface{}, err error)
- func (e TemplateValue) SetStaticResolver(binding Binding) StaticallyScopedValue
- func (e TemplateValue) StaticResolver() Binding
- func (e TemplateValue) String() string
- type UndefinedExpr
- type UnresolvedNode
- type UnresolvedNodes
- type ValidOrExpr
- type Validator
- type ValueExpr
- type WriteOpts
Constants ¶
View Source
const ( TEMPORARY = "&temporary" TEMPLATE = "&template" LOCAL = "&local" INJECT = "&inject" DEFAULT = "&default" STATE = "&state" )
View Source
const CATCH_ERROR = "error"
View Source
const CATCH_VALID = "valid"
View Source
const CATCH_VALUE = "value"
View Source
const DNS1035LabelMaxLength int = 63
View Source
const DNS1123LabelMaxLength int = 63
View Source
const DNS1123SubdomainMaxLength int = 253
View Source
const F_ParseURL = "parseurl"
View Source
const MaxInt = int64(MaxUint >> 1)
View Source
const MaxUint = ^uint64(0)
View Source
const (
OpAnd = "-and"
)
View Source
const (
OpOr = "-or"
)
View Source
const TYPE_FLOAT = 2
View Source
const TYPE_INT = 1
View Source
const TYPE_NUMBER = TYPE_FLOAT | TYPE_INT
Variables ¶
View Source
var MapToListContext = &mapToListContext{defaultContext{brackets: "[]", keyword: "map", list: true}}
View Source
var MapToMapContext = &mapToMapContext{defaultContext{brackets: "{}", keyword: "map", list: false}}
View Source
var SelectToListContext = &selectToListContext{defaultContext{brackets: "[]", keyword: "select", list: true}}
View Source
var SelectToMapContext = &selectToMapContext{defaultContext{brackets: "{}", keyword: "select", list: false}}
Functions ¶
func Base64Encode ¶ added in v1.3.0
func CatchEvaluationError ¶ added in v1.3.0
func CatchEvaluationError(result *interface{}, info *EvaluationInfo, ok *bool, msgfmt string, args ...interface{})
func EmptyError ¶ added in v1.3.0
func EmptyError() string
EmptyError returns a string explanation of a "must not be empty" validation failure.
func EvalValidationExpression ¶ added in v1.6.0
func ExpressionType ¶ added in v1.3.0
func ExpressionType(elem interface{}) string
func IsDNS1035Label ¶ added in v1.3.0
IsDNS1035Label tests for a string that conforms to the definition of a label in DNS (RFC 1035).
func IsDNS1123Label ¶ added in v1.3.0
IsDNS1123Label tests for a string that conforms to the definition of a label in DNS (RFC 1123).
func IsDNS1123Subdomain ¶ added in v1.3.0
IsDNS1123Subdomain tests for a string that conforms to the definition of a subdomain in DNS (RFC 1123).
func IsListExpansion ¶ added in v1.4.0
func IsListExpansion(e Expression) bool
func IsWildcardDNS1123Subdomain ¶ added in v1.3.0
IsWildcardDNS1123Subdomain tests for a string that conforms to the definition of a wildcard subdomain in DNS (RFC 1034 section 4.3.3).
func MakeStringList ¶ added in v1.4.0
func MakeStringList(list []string, info EvaluationInfo) []yaml.Node
func MaxLenError ¶ added in v1.3.0
MaxLenError returns a string explanation of a "string too long" validation failure.
func NewNode ¶ added in v1.3.0
func NewNode(val interface{}, src SourceProvider) yaml.Node
func NumberOperands ¶ added in v1.6.0
func NumberOperands(a, b interface{}) (interface{}, interface{}, error)
func NumberOperandsN ¶ added in v1.6.0
func PathComponents ¶ added in v1.3.0
func RaiseEvaluationError ¶ added in v1.3.0
func RaiseEvaluationError(resolved bool, info EvaluationInfo, ok bool)
func RaiseEvaluationErrorf ¶ added in v1.3.0
func RaiseEvaluationErrorf(format string, args ...interface{})
func RegexError ¶ added in v1.3.0
RegexError returns a string explanation of a regex validation failure.
func RegisterFunction ¶ added in v1.2.0
func RegisterValidator ¶ added in v1.3.0
func ReplaceRegExp ¶ added in v1.3.0
func ReplaceString ¶ added in v1.3.0
func SimpleValidatorResult ¶ added in v1.3.0
func StringValue ¶ added in v1.3.0
func ValidatorErrorf ¶ added in v1.3.0
func ValidatorResult ¶ added in v1.3.0
func ValueAsString ¶ added in v1.4.0
Types ¶
type AdditionExpr ¶
type AdditionExpr struct { A Expression B Expression }
func (AdditionExpr) Evaluate ¶
func (e AdditionExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (AdditionExpr) String ¶
func (e AdditionExpr) String() string
type Assignment ¶ added in v1.2.0
type Assignment struct { Key Expression Value Expression }
func (Assignment) String ¶ added in v1.2.0
func (e Assignment) String() string
type AutoExpr ¶
type AutoExpr struct {
Path []string
}
type Binding ¶
type Binding interface { SourceProvider GetStaticBinding() map[string]yaml.Node GetRootBinding() map[string]yaml.Node FindFromRoot([]string) (yaml.Node, bool) FindReference([]string) (yaml.Node, bool) FindInStubs([]string) (yaml.Node, bool) WithScope(step map[string]yaml.Node) Binding WithLocalScope(step map[string]yaml.Node) Binding WithPath(step string) Binding WithSource(source string) Binding WithNewRoot() Binding RedirectOverwrite(path []string) Binding Outer() Binding Path() []string StubPath() []string NoMerge() bool GetState() State GetTempName(data []byte) (string, error) GetFileContent(file string, cached bool) ([]byte, error) Flow(source yaml.Node, shouldOverride bool) (yaml.Node, Status) Cascade(outer Binding, template yaml.Node, partial bool, templates ...yaml.Node) (yaml.Node, error) }
type BooleanExpr ¶
type BooleanExpr struct {
Value bool
}
func (BooleanExpr) Evaluate ¶
func (e BooleanExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (BooleanExpr) String ¶
func (e BooleanExpr) String() string
type CallExpr ¶
type CallExpr struct { Function Expression Arguments []Expression Curry bool }
type CatchExpr ¶ added in v1.3.0
type CatchExpr struct { A Expression Lambda Expression }
type ComparisonExpr ¶ added in v1.2.0
type ComparisonExpr struct { A Expression Op string B Expression }
func (ComparisonExpr) Evaluate ¶ added in v1.2.0
func (e ComparisonExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (ComparisonExpr) String ¶ added in v1.2.0
func (e ComparisonExpr) String() string
type ConcatenationExpr ¶
type ConcatenationExpr struct { A Expression B Expression }
func (ConcatenationExpr) Evaluate ¶
func (e ConcatenationExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (ConcatenationExpr) String ¶
func (e ConcatenationExpr) String() string
type CondExpr ¶ added in v1.2.0
type CondExpr struct { C Expression T Expression F Expression }
type CreateMapExpr ¶ added in v1.2.0
type CreateMapExpr struct {
Assignments []Assignment
}
func (CreateMapExpr) Evaluate ¶ added in v1.2.0
func (e CreateMapExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (CreateMapExpr) String ¶ added in v1.2.0
func (e CreateMapExpr) String() string
type DefaultExpr ¶ added in v1.3.0
type DefaultExpr struct { }
func (DefaultExpr) Evaluate ¶ added in v1.3.0
func (e DefaultExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (DefaultExpr) String ¶ added in v1.3.0
func (e DefaultExpr) String() string
type DivisionExpr ¶ added in v1.2.0
type DivisionExpr struct { A Expression B Expression }
func (DivisionExpr) Evaluate ¶ added in v1.2.0
func (e DivisionExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (DivisionExpr) String ¶ added in v1.2.0
func (e DivisionExpr) String() string
type DynamicExpr ¶ added in v1.2.0
type DynamicExpr struct { Expression Expression Reference Expression }
func (DynamicExpr) Evaluate ¶ added in v1.2.0
func (e DynamicExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (DynamicExpr) String ¶ added in v1.2.0
func (e DynamicExpr) String() string
type DynamlGrammar ¶
type DynamlGrammar struct { Buffer string Parse func(rule ...int) error Reset func() Pretty bool // contains filtered or unexported fields }
func (*DynamlGrammar) Execute ¶ added in v1.2.0
func (p *DynamlGrammar) Execute()
func (*DynamlGrammar) Highlighter ¶
func (p *DynamlGrammar) Highlighter()
func (*DynamlGrammar) Init ¶
func (p *DynamlGrammar) Init()
func (*DynamlGrammar) PrintSyntaxTree ¶
func (p *DynamlGrammar) PrintSyntaxTree()
type EvaluationError ¶ added in v1.3.0
type EvaluationError struct { EvaluationInfo // contains filtered or unexported fields }
func (EvaluationError) Error ¶ added in v1.3.0
func (e EvaluationError) Error() string
type EvaluationInfo ¶ added in v1.2.0
type EvaluationInfo struct { RedirectPath []string Replace bool Merged bool Preferred bool KeyName string Source string LocalError bool Failed bool Undefined bool Raw bool Issue yaml.Issue Cleanups []Cleanup yaml.NodeFlags }
func DefaultInfo ¶ added in v1.2.0
func DefaultInfo() EvaluationInfo
func ResolveExpressionListOrPushEvaluation ¶ added in v1.2.0
func ResolveExpressionListOrPushEvaluation(list *[]Expression, resolved *bool, info *EvaluationInfo, binding Binding, locally bool) ([]interface{}, EvaluationInfo, bool)
func ResolveExpressionOrPushEvaluation ¶ added in v1.2.0
func ResolveExpressionOrPushEvaluation(e *Expression, resolved *bool, info *EvaluationInfo, binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func ResolveIntegerExpressionOrPushEvaluation ¶ added in v1.2.0
func ResolveIntegerExpressionOrPushEvaluation(e *Expression, resolved *bool, info *EvaluationInfo, binding Binding, locally bool) (int64, EvaluationInfo, bool)
func (*EvaluationInfo) AnnotateError ¶ added in v1.3.0
func (i *EvaluationInfo) AnnotateError(err EvaluationInfo, msgfmt interface{}, args ...interface{}) (interface{}, EvaluationInfo, bool)
func (EvaluationInfo) CleanError ¶ added in v1.6.1
func (i EvaluationInfo) CleanError() EvaluationInfo
func (*EvaluationInfo) Cleanup ¶ added in v1.3.0
func (i *EvaluationInfo) Cleanup() error
func (*EvaluationInfo) DenyOSOperation ¶ added in v1.5.0
func (i *EvaluationInfo) DenyOSOperation(name string) (interface{}, EvaluationInfo, bool)
func (*EvaluationInfo) Error ¶ added in v1.2.0
func (i *EvaluationInfo) Error(msgfmt interface{}, args ...interface{}) (interface{}, EvaluationInfo, bool)
func (EvaluationInfo) Join ¶ added in v1.2.0
func (i EvaluationInfo) Join(o EvaluationInfo) EvaluationInfo
func (*EvaluationInfo) PropagateError ¶ added in v1.2.0
func (i *EvaluationInfo) PropagateError(value interface{}, state Status, msgfmt string, args ...interface{}) (interface{}, EvaluationInfo, bool)
func (*EvaluationInfo) SetError ¶ added in v1.2.0
func (i *EvaluationInfo) SetError(msgfmt interface{}, args ...interface{})
func (EvaluationInfo) SourceName ¶ added in v1.2.0
func (e EvaluationInfo) SourceName() string
type Expander ¶ added in v1.3.0
func LambdaExpander ¶ added in v1.3.0
func LambdaExpander(lambda LambdaValue, binding Binding) Expander
type Expression ¶
type Expression interface {
Evaluate(Binding, bool) (interface{}, EvaluationInfo, bool)
}
func KeepArgWrapper ¶ added in v1.4.0
func KeepArgWrapper(e Expression, orig Expression) Expression
type ExpressionParseError ¶ added in v1.3.0
type ExpressionParseError struct {
// contains filtered or unexported fields
}
func NewParseError ¶ added in v1.3.0
func NewParseError(grammar *DynamlGrammar, token token32, msg error) *ExpressionParseError
func (ExpressionParseError) Error ¶ added in v1.3.0
func (e ExpressionParseError) Error() string
type FileEntry ¶ added in v1.3.0
type FileEntry struct {
// contains filtered or unexported fields
}
type Finder ¶ added in v1.3.0
func RegExpFinder ¶ added in v1.3.0
func StringFinder ¶ added in v1.3.0
type FloatExpr ¶ added in v1.6.0
type FloatExpr struct {
Value float64
}
type Function ¶ added in v1.2.0
type Function func(arguments []interface{}, binding Binding) (interface{}, EvaluationInfo, bool)
type GroupedExpr ¶ added in v1.3.0
type GroupedExpr struct {
Expr Expression
}
func (GroupedExpr) Evaluate ¶ added in v1.3.0
func (e GroupedExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (GroupedExpr) String ¶ added in v1.3.0
func (e GroupedExpr) String() string
type IntegerExpr ¶
type IntegerExpr struct {
Value int64
}
func (IntegerExpr) Evaluate ¶
func (e IntegerExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (IntegerExpr) String ¶
func (e IntegerExpr) String() string
type LambdaExpr ¶ added in v1.2.0
type LambdaExpr struct { Parameters []Parameter VarArgs bool E Expression }
func (LambdaExpr) Evaluate ¶ added in v1.2.0
func (e LambdaExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (LambdaExpr) String ¶ added in v1.2.0
func (e LambdaExpr) String() string
type LambdaRefExpr ¶ added in v1.2.0
type LambdaRefExpr struct { Source Expression Path []string StubPath []string }
func (LambdaRefExpr) Evaluate ¶ added in v1.2.0
func (e LambdaRefExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (LambdaRefExpr) String ¶ added in v1.2.0
func (e LambdaRefExpr) String() string
type LambdaValue ¶ added in v1.2.0
type LambdaValue struct { Parameters []Parameter // contains filtered or unexported fields }
func (LambdaValue) EquivalentTo ¶ added in v1.3.0
func (e LambdaValue) EquivalentTo(val interface{}) bool
func (LambdaValue) MarshalYAML ¶ added in v1.2.0
func (e LambdaValue) MarshalYAML() (tag string, value interface{}, err error)
func (LambdaValue) NumOptional ¶ added in v1.4.0
func (e LambdaValue) NumOptional() int
func (LambdaValue) ParameterIndex ¶ added in v1.4.0
func (e LambdaValue) ParameterIndex(name string) int
func (LambdaValue) SetStaticResolver ¶ added in v1.3.0
func (e LambdaValue) SetStaticResolver(binding Binding) StaticallyScopedValue
func (LambdaValue) StaticResolver ¶ added in v1.3.0
func (e LambdaValue) StaticResolver() Binding
func (LambdaValue) String ¶ added in v1.2.0
func (e LambdaValue) String() string
type Less ¶ added in v1.3.0
func LambdaLess ¶ added in v1.3.0
func LambdaLess(lambda LambdaValue, list []yaml.Node, binding Binding) Less
type ListExpansion ¶ added in v1.4.0
type ListExpansion interface { Expression IsListExpansion() bool }
type ListExpansionExpr ¶ added in v1.4.0
type ListExpansionExpr struct {
Expression
}
func (ListExpansionExpr) Evaluate ¶ added in v1.4.0
func (e ListExpansionExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (ListExpansionExpr) IsListExpansion ¶ added in v1.4.0
func (e ListExpansionExpr) IsListExpansion() bool
func (ListExpansionExpr) String ¶ added in v1.4.0
func (e ListExpansionExpr) String() string
type ListExpr ¶
type ListExpr struct {
Contents []Expression
}
type LogAndExpr ¶ added in v1.2.0
type LogAndExpr struct { A Expression B Expression }
func (LogAndExpr) Evaluate ¶ added in v1.2.0
func (e LogAndExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (LogAndExpr) String ¶ added in v1.2.0
func (e LogAndExpr) String() string
type LogOrExpr ¶ added in v1.2.0
type LogOrExpr struct { A Expression B Expression }
type Mapper ¶ added in v1.6.1
type Mapper func(inline bool, value interface{}, e LambdaValue, binding Binding, aggr MappingAggregation) (interface{}, EvaluationInfo, bool)
func MapperForSource ¶ added in v1.6.1
func MapperForSource(value interface{}) Mapper
type MappingAggregation ¶ added in v1.3.0
type MappingAggregation interface { DoMapping(inline bool, value interface{}, e LambdaValue, binding Binding) (interface{}, EvaluationInfo, bool) Add(key interface{}, value interface{}, n yaml.Node, info EvaluationInfo) error Result() interface{} }
type MappingContext ¶ added in v1.3.0
type MappingContext interface { CreateMappingAggregation(source interface{}) MappingAggregation Keyword() string Brackets() string Supports(source interface{}) bool }
type MappingExpr ¶ added in v1.3.0
type MappingExpr struct { A Expression Lambda Expression Context MappingContext }
func (MappingExpr) Evaluate ¶ added in v1.3.0
func (e MappingExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (MappingExpr) String ¶ added in v1.3.0
func (e MappingExpr) String() string
type MarkerExpr ¶ added in v1.2.0
type MarkerExpr struct {
// contains filtered or unexported fields
}
func (MarkerExpr) Evaluate ¶ added in v1.2.0
func (e MarkerExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (MarkerExpr) GetFlags ¶ added in v1.2.0
func (e MarkerExpr) GetFlags() yaml.NodeFlags
func (MarkerExpr) Has ¶ added in v1.2.0
func (e MarkerExpr) Has(t string) bool
func (MarkerExpr) MarshalYAML ¶ added in v1.2.0
func (e MarkerExpr) MarshalYAML() (tag string, value interface{}, err error)
func (MarkerExpr) String ¶ added in v1.2.0
func (e MarkerExpr) String() string
func (MarkerExpr) TemplateExpression ¶ added in v1.2.0
func (e MarkerExpr) TemplateExpression(orig yaml.Node) yaml.Node
type MarkerExpressionExpr ¶ added in v1.2.0
type MarkerExpressionExpr struct {
// contains filtered or unexported fields
}
func (MarkerExpressionExpr) Evaluate ¶ added in v1.2.0
func (e MarkerExpressionExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (MarkerExpressionExpr) String ¶ added in v1.2.0
func (e MarkerExpressionExpr) String() string
type MergeExpr ¶
type MergeExpr struct { Path []string Redirect bool Replace bool Required bool None bool KeyName string }
type ModuloExpr ¶ added in v1.2.0
type ModuloExpr struct { A Expression B Expression }
func (ModuloExpr) Evaluate ¶ added in v1.2.0
func (e ModuloExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (ModuloExpr) String ¶ added in v1.2.0
func (e ModuloExpr) String() string
type MultiplicationExpr ¶ added in v1.2.0
type MultiplicationExpr struct { A Expression B Expression }
func (MultiplicationExpr) Evaluate ¶ added in v1.2.0
func (e MultiplicationExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (MultiplicationExpr) String ¶ added in v1.2.0
func (e MultiplicationExpr) String() string
type NameArgument ¶ added in v1.4.0
type NameArgument struct { Name string Expression }
func (NameArgument) String ¶ added in v1.4.0
func (a NameArgument) String() string
type NilExpr ¶
type NilExpr struct{}
type NotExpr ¶ added in v1.2.0
type NotExpr struct {
Expr Expression
}
type OrExpr ¶
type OrExpr struct { A Expression B Expression }
type Parameter ¶ added in v1.4.0
type Parameter struct { Name string Default Expression }
type PreferExpr ¶ added in v1.2.0
type PreferExpr struct {
// contains filtered or unexported fields
}
func (PreferExpr) Evaluate ¶ added in v1.2.0
func (e PreferExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (PreferExpr) String ¶ added in v1.2.0
func (e PreferExpr) String() string
type ProjectionExpr ¶ added in v1.2.0
type ProjectionExpr struct { Expression Expression Value *ProjectionValue Projection Expression }
func (ProjectionExpr) Evaluate ¶ added in v1.2.0
func (e ProjectionExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (ProjectionExpr) String ¶ added in v1.2.0
func (e ProjectionExpr) String() string
type ProjectionValue ¶ added in v1.2.0
type ProjectionValue struct {
Value interface{}
}
type ProjectionValueExpr ¶ added in v1.2.0
type ProjectionValueExpr struct {
Value *ProjectionValue
}
func (ProjectionValueExpr) Evaluate ¶ added in v1.2.0
func (e ProjectionValueExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (ProjectionValueExpr) String ¶ added in v1.2.0
func (e ProjectionValueExpr) String() string
type QualifiedExpr ¶ added in v1.2.0
type QualifiedExpr struct { Expression Expression Reference ReferenceExpr }
func (QualifiedExpr) Evaluate ¶ added in v1.2.0
func (e QualifiedExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (QualifiedExpr) String ¶ added in v1.2.0
func (e QualifiedExpr) String() string
type RangeExpr ¶ added in v1.2.0
type RangeExpr struct { Start Expression End Expression }
type ReferenceExpr ¶
type ReferenceExpr struct {
Path []string
}
func (ReferenceExpr) Evaluate ¶
func (e ReferenceExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (ReferenceExpr) String ¶
func (e ReferenceExpr) String() string
type Registry ¶ added in v1.6.0
type Registry interface { RegisterFunction(name string, f Function) LookupFunction(name string) Function }
func NewRegistry ¶ added in v1.6.0
func NewRegistry() Registry
type ScopeExpr ¶ added in v1.3.0
type ScopeExpr struct { CreateMapExpr E Expression }
type SliceExpr ¶ added in v1.2.0
type SliceExpr struct { Expression Expression Range RangeExpr }
type SourceProvider ¶ added in v1.2.0
type SourceProvider interface {
SourceName() string
}
type StaticallyScopedValue ¶ added in v1.3.0
type StaticallyScopedValue interface { StaticResolver() Binding SetStaticResolver(binding Binding) StaticallyScopedValue }
type StringExpr ¶
type StringExpr struct {
Value string
}
func (StringExpr) Evaluate ¶
func (e StringExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (StringExpr) String ¶
func (e StringExpr) String() string
type SubstitutionExpr ¶ added in v1.2.0
type SubstitutionExpr struct {
Template Expression
}
func (SubstitutionExpr) Evaluate ¶ added in v1.2.0
func (e SubstitutionExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (SubstitutionExpr) String ¶ added in v1.2.0
func (e SubstitutionExpr) String() string
type SubtractionExpr ¶
type SubtractionExpr struct { A Expression B Expression }
func (SubtractionExpr) Evaluate ¶
func (e SubtractionExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (SubtractionExpr) String ¶
func (e SubtractionExpr) String() string
type SumExpr ¶ added in v1.2.0
type SumExpr struct { A Expression I Expression Lambda Expression }
type SyncExpr ¶ added in v1.3.0
type SyncExpr struct { A Expression Cond Expression Value Expression Timeout Expression // contains filtered or unexported fields }
type TemplateValue ¶ added in v1.2.0
type TemplateValue struct { Path []string Prepared yaml.Node Orig yaml.Node // contains filtered or unexported fields }
func NewTemplateValue ¶ added in v1.3.0
func (TemplateValue) EquivalentTo ¶ added in v1.3.0
func (e TemplateValue) EquivalentTo(val interface{}) bool
func (TemplateValue) MarshalYAML ¶ added in v1.2.0
func (e TemplateValue) MarshalYAML() (tag string, value interface{}, err error)
func (TemplateValue) SetStaticResolver ¶ added in v1.3.0
func (e TemplateValue) SetStaticResolver(binding Binding) StaticallyScopedValue
func (TemplateValue) StaticResolver ¶ added in v1.3.0
func (e TemplateValue) StaticResolver() Binding
func (TemplateValue) String ¶ added in v1.3.0
func (e TemplateValue) String() string
type UndefinedExpr ¶ added in v1.2.0
type UndefinedExpr struct{}
func (UndefinedExpr) Evaluate ¶ added in v1.2.0
func (e UndefinedExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (UndefinedExpr) String ¶ added in v1.2.0
func (e UndefinedExpr) String() string
type UnresolvedNode ¶ added in v1.2.0
func FindUnresolvedNodes ¶ added in v1.2.0
func FindUnresolvedNodes(root yaml.Node, context ...string) (result []UnresolvedNode)
type UnresolvedNodes ¶ added in v1.2.0
type UnresolvedNodes struct {
Nodes []UnresolvedNode
}
func (UnresolvedNodes) Error ¶ added in v1.2.0
func (e UnresolvedNodes) Error() string
func (UnresolvedNodes) HasError ¶ added in v1.2.0
func (e UnresolvedNodes) HasError() bool
type ValidOrExpr ¶ added in v1.3.0
type ValidOrExpr struct { A Expression B Expression }
func (ValidOrExpr) Evaluate ¶ added in v1.3.0
func (e ValidOrExpr) Evaluate(binding Binding, locally bool) (interface{}, EvaluationInfo, bool)
func (ValidOrExpr) String ¶ added in v1.3.0
func (e ValidOrExpr) String() string
Source Files ¶
- addition.go
- archive.go
- auto.go
- base64.go
- basename.go
- bcrypt.go
- boolean.go
- call.go
- catch.go
- compact.go
- comparison.go
- concatenation.go
- cond.go
- contains.go
- default.go
- defined.go
- division.go
- dns.go
- dynamic_expression.go
- dynaml.peg.go
- element.go
- env.go
- error.go
- eval.go
- exec.go
- expression.go
- files.go
- float.go
- format.go
- grouped.go
- index.go
- integer.go
- intersect.go
- ip.go
- ipset.go
- join.go
- json.go
- keys.go
- lambda.go
- length.go
- list.go
- list_to_map.go
- listexpansion.go
- log_and.go
- log_or.go
- lookup.go
- lower.go
- makemap.go
- map.go
- mapmerge.go
- mapping.go
- marker.go
- match.go
- md5.go
- md5crypt.go
- merge.go
- mkdir.go
- modulo.go
- multiplication.go
- nil.go
- node.go
- not.go
- or.go
- parser.go
- parseurl.go
- pipe.go
- prefer.go
- projection.go
- qualified_expression.go
- rand.go
- range.go
- read.go
- reference.go
- replace.go
- require.go
- reverse.go
- scope.go
- select.go
- slice.go
- sort.go
- split.go
- static_ips.go
- string.go
- stub.go
- substr.go
- subtraction.go
- sum.go
- sync.go
- tempfile.go
- template.go
- trim.go
- type.go
- undefined.go
- uniq.go
- unresolved_check.go
- validate.go
- validor.go
- value.go
- write.go
Click to show internal directories.
Click to hide internal directories.