Compile-time validation helpers for PgFlow DSL macros.
Used internally by PgFlow.Flow and PgFlow.Job to
validate module attributes during compilation.
Summary
Functions
Validates the cron option.
Functions
@spec validate_cron_option!(String.t() | keyword(), Macro.Env.t()) :: {String.t(), map()} | no_return()
Validates the cron option.
Accepts either:
- A string shorthand:
cron: "@hourly"(equivalent tocron: [schedule: "@hourly"]) - A keyword list:
cron: [schedule: "@hourly", input: %{key: "value"}]
Options when using keyword list:
:scheduleis required and must be a valid cron expression string:inputis optional and must be a map (defaults to%{})
Returns {schedule, input} tuple on success.