mirror of
https://github.com/superseriousbusiness/gotosocial.git
synced 2025-05-07 00:14:48 +00:00
This updates our configuration code generator to now also include map marshal and unmarshalers. So we now have much more control over how things get read from pflags, and stored / read from viper configuration. This allows us to set ALL configuration variables by CLI and environment now, AND support nested configuration files. e.g. ```yaml advanced: scraper-deterrence = true http-client: allow-ips = ["127.0.0.1"] ``` is the same as ```yaml advanced-scraper-deterrence = true http-client-allow-ips = ["127.0.0.1"] ``` This also starts cleaning up of our jumbled Configuration{} type by moving the advanced configuration options into their own nested structs, also as a way to show what it's capable of. It's worth noting however that nesting only works if the Go types are nested too (as this is how we hint to our code generator to generate the necessary flattening code :p). closes #3195 Reviewed-on: https://codeberg.org/superseriousbusiness/gotosocial/pulls/4109 Co-authored-by: kim <grufwub@gmail.com> Co-committed-by: kim <grufwub@gmail.com> |
||
---|---|---|
.. | ||
media | ||
config.go | ||
db.go | ||
email.go | ||
federatingdb.go | ||
federator.go | ||
gin.go | ||
log.go | ||
mediahandler.go | ||
oauthserver.go | ||
processor.go | ||
router.go | ||
storage.go | ||
testmodels.go | ||
teststructs.go | ||
transportcontroller.go | ||
util.go | ||
webpush.go |