summaryrefslogtreecommitdiff
path: root/internal/cache/size.go
diff options
context:
space:
mode:
authorLibravatar tobi <31960611+tsmethurst@users.noreply.github.com>2025-03-03 16:03:36 +0100
committerLibravatar GitHub <noreply@github.com>2025-03-03 15:03:36 +0000
commit1b37944f8b8eccc2afcfb0f603786209a3b7402d (patch)
tree2bc0be27cf0405e16ac3e14efc3b6973eb096b8b /internal/cache/size.go
parentbumps go-ffmpreg to v0.6.6 (#3866) (diff)
downloadgotosocial-1b37944f8b8eccc2afcfb0f603786209a3b7402d.tar.xz
[feature] Refactor tokens, allow multiple app redirect_uris (#3849)
* [feature] Refactor tokens, allow multiple app redirect_uris * move + tweak handlers a bit * return error for unset oauth2.ClientStore funcs * wrap UpdateToken with cache * panic handling * cheeky little time optimization * unlock on error
Diffstat (limited to 'internal/cache/size.go')
-rw-r--r--internal/cache/size.go31
1 files changed, 9 insertions, 22 deletions
diff --git a/internal/cache/size.go b/internal/cache/size.go
index c96a3cd2e..1c8c5fe2e 100644
--- a/internal/cache/size.go
+++ b/internal/cache/size.go
@@ -302,15 +302,14 @@ func sizeofAccountStats() uintptr {
func sizeofApplication() uintptr {
return uintptr(size.Of(&gtsmodel.Application{
- ID: exampleID,
- CreatedAt: exampleTime,
- UpdatedAt: exampleTime,
- Name: exampleUsername,
- Website: exampleURI,
- RedirectURI: exampleURI,
- ClientID: exampleID,
- ClientSecret: exampleID,
- Scopes: exampleTextSmall,
+ ID: exampleID,
+ Name: exampleUsername,
+ Website: exampleURI,
+ RedirectURIs: []string{exampleURI},
+ ClientID: exampleID,
+ ClientSecret: exampleID,
+ Scopes: exampleTextSmall,
+ ManagedByUserID: exampleID,
}))
}
@@ -325,17 +324,6 @@ func sizeofBlock() uintptr {
}))
}
-func sizeofClient() uintptr {
- return uintptr(size.Of(&gtsmodel.Client{
- ID: exampleID,
- CreatedAt: exampleTime,
- UpdatedAt: exampleTime,
- Secret: exampleID,
- Domain: exampleURI,
- UserID: exampleID,
- }))
-}
-
func sizeofConversation() uintptr {
return uintptr(size.Of(&gtsmodel.Conversation{
ID: exampleID,
@@ -752,8 +740,7 @@ func sizeofThreadMute() uintptr {
func sizeofToken() uintptr {
return uintptr(size.Of(&gtsmodel.Token{
ID: exampleID,
- CreatedAt: exampleTime,
- UpdatedAt: exampleTime,
+ LastUsed: exampleTime,
ClientID: exampleID,
UserID: exampleID,
RedirectURI: exampleURI,