template-monorepo/internal/model/member/domain/usecase/verify_rate.go

13 lines
340 B
Go

package usecase
import (
"context"
"time"
)
// VerifyRateUseCase guards OTP resend cooldown and daily verification quotas.
type VerifyRateUseCase interface {
AssertResendAllowed(ctx context.Context, key string, cooldown time.Duration) error
AssertDailyAllowed(ctx context.Context, key string, window time.Duration, limit int) error
}