summaryrefslogtreecommitdiff
path: root/internal/gtsmodel/routersession.go
diff options
context:
space:
mode:
authorLibravatar tsmethurst <tobi.smethurst@klarrio.com>2021-08-30 13:38:06 +0200
committerLibravatar tsmethurst <tobi.smethurst@protonmail.com>2021-09-01 11:11:26 +0200
commitdc2e1bf9aba9b52b6de979aadb1a0efcbd07f088 (patch)
treed4104270d6ce275d0cded0459bf3168cab3526ab /internal/gtsmodel/routersession.go
parentstatusmute annotations (diff)
downloadgotosocial-dc2e1bf9aba9b52b6de979aadb1a0efcbd07f088.tar.xz
more work on struct validation
Diffstat (limited to 'internal/gtsmodel/routersession.go')
-rw-r--r--internal/gtsmodel/routersession.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/internal/gtsmodel/routersession.go b/internal/gtsmodel/routersession.go
index fbc1c7768..374264fe4 100644
--- a/internal/gtsmodel/routersession.go
+++ b/internal/gtsmodel/routersession.go
@@ -20,7 +20,7 @@ package gtsmodel
// RouterSession is used to store and retrieve settings for a router session.
type RouterSession struct {
- ID string `bun:"type:CHAR(26),pk,notnull"`
- Auth []byte `bun:"type:bytea,notnull,nullzero"`
- Crypt []byte `bun:"type:bytea,notnull,nullzero"`
+ ID string `validate:"required,ulid" bun:"type:CHAR(26),pk,nullzero,notnull"`
+ Auth []byte `validate:"required,len=32" bun:"type:bytea,notnull,nullzero"`
+ Crypt []byte `validate:"required,len=32" bun:"type:bytea,notnull,nullzero"`
}