replace Id with ID

This commit is contained in:
2025-02-13 08:00:49 -06:00
parent f948a06b66
commit 32facb1767
19 changed files with 172 additions and 169 deletions

View File

@@ -20,19 +20,19 @@ func NewForgotNKodeCache() ForgotNKodeCache {
return ForgotNKodeCache{forgotCache}
}
func (f *ForgotNKodeCache) Set(userEmail entities.UserEmail, customerId entities.CustomerId) {
func (f *ForgotNKodeCache) Set(userEmail entities.UserEmail, customerId entities.CustomerID) {
f.innerCache.Set(key(userEmail, customerId), true, forgotExpiration)
}
func (f *ForgotNKodeCache) Get(userEmail entities.UserEmail, customerId entities.CustomerId) bool {
func (f *ForgotNKodeCache) Get(userEmail entities.UserEmail, customerId entities.CustomerID) bool {
_, found := f.innerCache.Get(key(userEmail, customerId))
return found
}
func (f *ForgotNKodeCache) Delete(userEmail entities.UserEmail, customerId entities.CustomerId) {
func (f *ForgotNKodeCache) Delete(userEmail entities.UserEmail, customerId entities.CustomerID) {
f.innerCache.Delete(key(userEmail, customerId))
}
func key(email entities.UserEmail, id entities.CustomerId) string {
func key(email entities.UserEmail, id entities.CustomerID) string {
return string(email) + id.String()
}