aboutsummaryrefslogtreecommitdiff
path: root/internal/db
diff options
context:
space:
mode:
authorJoe Chen <jc@unknwon.io>2022-10-24 23:45:31 +0800
committerGitHub <noreply@github.com>2022-10-24 23:45:31 +0800
commit131be6e074039e590488892d7a99ebdbe6eb4668 (patch)
tree391833ed53f439aa469af080591e372b79067b65 /internal/db
parent49be63abbfc4290b281e05493a0f65bb710c2ade (diff)
refactor(db): migrate helpers off `user_cache.go` (#7214)
Diffstat (limited to 'internal/db')
-rw-r--r--internal/db/user_cache.go20
1 files changed, 0 insertions, 20 deletions
diff --git a/internal/db/user_cache.go b/internal/db/user_cache.go
deleted file mode 100644
index f4fa8172..00000000
--- a/internal/db/user_cache.go
+++ /dev/null
@@ -1,20 +0,0 @@
-// Copyright 2018 The Gogs Authors. All rights reserved.
-// Use of this source code is governed by a MIT-style
-// license that can be found in the LICENSE file.
-
-package db
-
-import (
- "fmt"
-)
-
-// MailResendCacheKey returns key used for cache mail resend.
-func (u *User) MailResendCacheKey() string {
- return fmt.Sprintf("MailResend_%d", u.ID)
-}
-
-// TwoFactorCacheKey returns key used for cache two factor passcode.
-// e.g. TwoFactor_1_012664
-func (u *User) TwoFactorCacheKey(passcode string) string {
- return fmt.Sprintf("TwoFactor_%d_%s", u.ID, passcode)
-}