Replies: 1 comment
-
A bit more detail: At go compile time, I don't know which variables are needed and I don't know which types are needed. At CEL compile time, I know which types are needed and which variables. The service I'm hoping to integrate CEL into is a workflow system where every node has a defined output described by a simplified version of JSON Schema. In some nodes I want to allow usage of CEL which has access to the output of all previous nodes. An example could be a if/then/else node where you describe the condition using CEL. So if a previous node called userLookup has a user as output, a if/then/else node could access that user in CEL like The node types in my system can be defined by plugins at runtime, so the node types and their output schema is not known at Go compile time, but it is at CEL compile time. |
Beta Was this translation helpful? Give feedback.
-
I'm trying to figure out if I can use cel-go for my project, but I keep going around in circles and need some help.
I'm in a situation where I don't know the types of variables at Go compile time so I need dynamic types. I do however know the variable types at CEL compile time, and would love to get compile and type errors from the CEL parser/checker.
I feel like this should be possible, but I can't figure it out.
Stretch goal: The number of variables can be quite large, so it would be awesome if I don't have to specify them all in the env, but rather supply the types on demand during CEL compilation.
Beta Was this translation helpful? Give feedback.
All reactions