diff options
| author | 2025-03-03 16:03:36 +0100 | |
|---|---|---|
| committer | 2025-03-03 15:03:36 +0000 | |
| commit | 1b37944f8b8eccc2afcfb0f603786209a3b7402d (patch) | |
| tree | 2bc0be27cf0405e16ac3e14efc3b6973eb096b8b /internal/cache/size.go | |
| parent | bumps go-ffmpreg to v0.6.6 (#3866) (diff) | |
| download | gotosocial-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.go | 31 |
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(>smodel.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(>smodel.Client{ - ID: exampleID, - CreatedAt: exampleTime, - UpdatedAt: exampleTime, - Secret: exampleID, - Domain: exampleURI, - UserID: exampleID, - })) -} - func sizeofConversation() uintptr { return uintptr(size.Of(>smodel.Conversation{ ID: exampleID, @@ -752,8 +740,7 @@ func sizeofThreadMute() uintptr { func sizeofToken() uintptr { return uintptr(size.Of(>smodel.Token{ ID: exampleID, - CreatedAt: exampleTime, - UpdatedAt: exampleTime, + LastUsed: exampleTime, ClientID: exampleID, UserID: exampleID, RedirectURI: exampleURI, |
