spark-server/internal/module/sms/logic/store.go
2026-09-22 17:07:26 +08:00

12 lines
366 B
Go

package logic
import "context"
// CodeStore persists OTP values and per-target send cooldowns.
type CodeStore interface {
Put(ctx context.Context, key, code string, ttlSeconds int) error
Get(ctx context.Context, key string) (string, error)
Del(ctx context.Context, key string) error
SetCooldown(ctx context.Context, key string, ttlSeconds int) (bool, error)
}