Commit Graph

5 Commits

Author SHA1 Message Date
Florian Beisel f4b6197728
🏗️ Move calling Generate function to rules
This change moves the responsibility of calling the HostnameRule.Generate
function to the corresponding HostnameRule.{Insert,Update} functions
which will allow autonomy especially for the update functions on when
a hostname needs to be regenerated.
2024-01-21 16:00:33 +01:00
Florian Beisel a4748d7619
♻️ Rework rules registration
This commit adds a rule registry as a central place to register new
rules. It will expose a Description and a factory to create a rule
object.
2024-01-21 14:45:58 +01:00
Florian Beisel f0118ab8ea
🐛 Use OldHostname when querying the Database
In BaseRule.baseUpdate our goal is to check if a hostname exists before
trying to rename that hostname into something else. This patch fixes an
error where the newly generated Hostname was used to check for the
existence of the old hostname.
2024-01-18 00:11:39 +01:00
Florian Beisel 607682884c
📝 Create missing models for API documentation 2024-01-18 00:09:26 +01:00
Florian Beisel b58430af9a
Initial commit 2024-01-17 18:05:55 +01:00