Draft: Server settings

This merge request adds server settings. It doesn't include the client/UI settings. They ended up being pretty different, so I thought I would tackle them one at a time.

The settings here are defined in Go, similar to the way we define the command line with Cobra. There are no settings included with this merge request, but there are some tests that you can look at if you want to see an example of how you would create some settings. (example is in settings_test.go)

The design ended up a little more complex than I expected, but I think it's worth it. It would be easy to extend with additional functionality as we need it. We could add actions to settings or groups that can be invoked through a GraphQL mutation (I'm imagining a 'sendTestEmail' action on an email settings group). It should also work pretty well with a plugin system. We could create a setting group for each plugin and let them register settings on it, without giving them access to our internal settings.

The other thing that I had in mind is that this should be able to provide all the information we would need to generate the front-end settings page on-the-fly. It returns human readable names and descriptions for each group and setting, and for settings that would be a dropdown list, it can provide a list of options.

If it isn't at all what you all want, I'm happy to re-work whatever you want to, or we can throw this out if someone else has a plan they want to go with. It should fix half of #258.

Edited by Chris Brower

Merge request reports

Loading