Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrEmptyExpression is returned when an expr field tag carries no expression. ErrEmptyExpression = errors.New("expression: empty expression in field tag") // ErrFieldNotSettable is returned when the target field cannot be assigned. ErrFieldNotSettable = errors.New("expression: target field is not settable") )
View Source
var Module = fx.Module( "vef:expression", fx.Provide( exprlang.New, fx.Annotate( NewEngineResolver, fx.ResultTags(`group:"vef:api:handler_param_resolvers"`), ), fx.Annotate( NewFieldTransformer, fx.ResultTags(`group:"vef:mold:field_transformers"`), ), ), )
Module wires the expression feature: the expr-lang-backed engine plus the API handler parameter resolver and the mold field transformer. The engine is provided only as the public expression.Engine contract, so consumers depend on the interface and the backend can be swapped without touching them.
Functions ¶
func NewEngineResolver ¶
func NewEngineResolver(engine expression.Engine) api.HandlerParamResolver
NewEngineResolver creates a handler parameter resolver for expression.Engine.
func NewFieldTransformer ¶
func NewFieldTransformer(engine expression.Engine) mold.FieldTransformer
NewFieldTransformer creates a mold field transformer backed by engine.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.