From 131be6e074039e590488892d7a99ebdbe6eb4668 Mon Sep 17 00:00:00 2001 From: Joe Chen Date: Mon, 24 Oct 2022 23:45:31 +0800 Subject: refactor(db): migrate helpers off `user_cache.go` (#7214) --- internal/db/user_cache.go | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 internal/db/user_cache.go (limited to 'internal/db') 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) -} -- cgit v1.2.3