GoToSocial/internal/gtsmodel
tobi 183eaa5b29
[feature] Implement explicit domain allows + allowlist federation mode (#2200)
* love like winter! wohoah, wohoah

* domain allow side effects

* tests! logging! unallow!

* document federation modes

* linty linterson

* test

* further adventures in documentation

* finish up domain block documentation (i think)

* change wording a wee little bit

* docs, example

* consolidate shared domainPermission code

* call mode once

* fetch federation mode within domain blocked func

* read domain perm import in streaming manner

* don't use pointer to slice for domain perms

* don't bother copying blocks + allows before deleting

* admonish!

* change wording just a scooch

* update docs
2023-09-21 12:12:04 +02:00
..
README.md Prune unnecessary nullzeros, fixup db tags (#200) 2021-09-10 10:08:21 +02:00
account.go [feature] Allow admins to expire remote public keys; refetch expired keys on demand (#2183) 2023-09-12 10:43:12 +01:00
accountnote.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
adminaction.go [feature] Implement explicit domain allows + allowlist federation mode (#2200) 2023-09-21 12:12:04 +02:00
application.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
block.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
client.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
domainallow.go [feature] Implement explicit domain allows + allowlist federation mode (#2200) 2023-09-21 12:12:04 +02:00
domainblock.go [feature] Implement explicit domain allows + allowlist federation mode (#2200) 2023-09-21 12:12:04 +02:00
domainpermission.go [feature] Implement explicit domain allows + allowlist federation mode (#2200) 2023-09-21 12:12:04 +02:00
emaildomainblock.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
emoji.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
emojicategory.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
follow.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
followrequest.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
instance.go [feature] Instance rules (#2125) 2023-08-19 14:33:15 +02:00
list.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
marker.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
mediaattachment.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
mention.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
notification.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
report.go [feature] Instance rules (#2125) 2023-08-19 14:33:15 +02:00
routersession.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
rule.go [feature] Instance rules (#2125) 2023-08-19 14:33:15 +02:00
status.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
statusbookmark.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
statusfave.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
statusmute.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
tag.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
token.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
tombstone.go [chore] Remove go-playground/validator (#2069) 2023-08-06 12:22:40 +02:00
user.go [feature] Store admin actions in the db, prevent conflicting actions (#2167) 2023-09-04 14:55:17 +01:00

README.md

A note on when we should set data structures linked to objects in the database to use the bun nullzero tag -- this should only be done if the member type is a pointer, or if the this primitive type is literally invalid with an empty value (e.g. media IDs which when empty signifies a null database value, compared to say an account note which when empty could mean either an empty note OR null database value).

Obviously it is a little more complex than this in practice, but keep it in mind!