diff options
author | 2022-09-02 10:58:42 +0100 | |
---|---|---|
committer | 2022-09-02 11:58:42 +0200 | |
commit | 077e66381fffb47038a99ce82c7c07a1f1b19f62 (patch) | |
tree | 69680266fae036a7da476ead8d45a37ebdb7d9c5 /internal/db/account.go | |
parent | [performance] use GetAccountByUsernameDomain() for local account lookups to r... (diff) | |
download | gotosocial-077e66381fffb47038a99ce82c7c07a1f1b19f62.tar.xz |
[performance] cache account db lookups by public key URI (#795)
Signed-off-by: kim <grufwub@gmail.com>
Signed-off-by: kim <grufwub@gmail.com>
Diffstat (limited to 'internal/db/account.go')
-rw-r--r-- | internal/db/account.go | 3 |
1 files changed, 3 insertions, 0 deletions
diff --git a/internal/db/account.go b/internal/db/account.go index 54e24784f..04c76777f 100644 --- a/internal/db/account.go +++ b/internal/db/account.go @@ -39,6 +39,9 @@ type Account interface { // GetAccountByUsernameDomain returns one account with the given username and domain, or an error if something goes wrong. GetAccountByUsernameDomain(ctx context.Context, username string, domain string) (*gtsmodel.Account, Error) + // GetAccountByPubkeyID returns one account with the given public key URI (ID), or an error if something goes wrong. + GetAccountByPubkeyID(ctx context.Context, id string) (*gtsmodel.Account, Error) + // UpdateAccount updates one account by ID. UpdateAccount(ctx context.Context, account *gtsmodel.Account) (*gtsmodel.Account, Error) |