Common Expression Language (CEL) Guide
Octelium conditions are based on the Common Expression Language (CEL). CEL expressions are used to easily write dynamic, context aware and performant one-liner conditions that evaluate a boolean value used to match a rule without having to actually have to learn a new programming language.
Numbers
Strings
Strings have their own methods and functions. Here are some examples:
Lists
Lists have their own methods that provides you with some important utilities. Here are some examples:
Maps
Math
Time
Octelium provides you with the function now() to use the current timestamp. Also, the timestamp() function converts a RFC3339 time format to a timestamp. Moreover, you can use the duration() function to compare time durations. Here are some examples:
JSON
You can parse/unmarshal a JSON string as a map and use it in your logic. Here is an example:
You can also marshal a JSON object to a string as follows:
Net
Octelium CEL engine supports a few network-specific functions as follows: