Documentation
¶
Overview ¶
Package api is brevis-sql-api as a library: the command, with the hooks a binary of your own registers.
The published binary is ten lines around Main with no hooks, and so is yours with some -- sql/example is one:
hooks := api.NewHooks()
hooks.MustRegisterBefore("check_window", checkWindow)
hooks.MustRegisterAfter("to_series", toSeries)
api.Main(hooks)
A BINARY OF ITS OWN and not a `brevis-sql` subcommand, for the weight `sql-weight.sh` guards: `brevis-sql` runs as a step in every pipeline that builds a model, and it must not carry what an HTTP API needs and a build never uses. Same module, so the connections, the dialects and the read-only guard are the ones the build and `serve` already trust.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type After ¶
After returns what becomes the answer's `data`. Its output is cached, so it must be a function of its Result.
type Before ¶
Before runs before the parameters are read: nil goes on, Refuse answers 400, any other error answers 500 with the text kept for the audit line.