Commit Graph

6 Commits

Author SHA1 Message Date
Gibheer cb13ceab8f add a debug output mode
This can be enabled in the config, but needs to be added in other
places.
2021-05-21 20:55:48 +02:00
Gibheer 8131e0a7e7 add history support
This commit consists of two things.

1. server.go will now set two variables for the current transaction, the
   username and request id. These are transaction local and therefore do
   not leak into the connection.

2. The initial schema received a history table and a trigger. This
   trigger writes changes into the history table. When inserting records
   the function will pull the transaction local variables and add them
   to the record.
   The trigger is added to all tables, so that a complete changelog is
   created.

These changes serve as the basis for further features. One is the
searching for changes on specific resources (think history rr, history
zone, ...).
The other feature is a way to subscribe to changes in the database based
on filters. This will be the way to implement the output feature of dim.
2021-05-09 20:32:34 +02:00
Gibheer 8953b10faa define result as interface{}
This way we can easily reset the result after we hit an error, which
then omits the result.
2021-05-03 19:43:25 +02:00
Gibheer 979164f4d2 add functions to parse incoming request parameters
These helpers enable the parameter parsing into method specific structs.
As the parameter list is an array, the order of arguments is important.

Sadly type checks can be done at runtime, because all parameters are
converted to a list of interface{}. So if there is an error, it will
only result in an error at runtime, so be careful.
2021-04-22 08:33:32 +02:00
Gibheer bf0f3c5eac add transaction to context
This adds the transaction handling to the connection and context
handling.
It will raise an error and inform the client if anything is going wrong
with the transaction.
2021-04-21 21:50:46 +02:00
Gibheer 2ee6db04e5 initial release 2021-04-21 21:40:55 +02:00