switch PATs to map and add deletion

This commit is contained in:
Pascal Fischer
2023-03-20 16:14:55 +01:00
parent e1ef091d45
commit e30def175b
8 changed files with 162 additions and 26 deletions

View File

@@ -11,6 +11,8 @@ type Store interface {
GetTokenIDByHashedToken(secret string) (string, error)
GetUserByTokenID(tokenID string) (*User, error)
SaveAccount(account *Account) error
DeleteHashedPAT2TokenIDIndex(hashedToken string) error
DeleteTokenID2UserIDIndex(tokenID string) error
GetInstallationID() string
SaveInstallationID(ID string) error
// AcquireAccountLock should attempt to acquire account lock and return a function that releases the lock