NewEmailRepository 创建并返回一个新的 smsRepository 实例
(cache cache.EmailCache, l *zap.Logger)
| 23 | |
| 24 | // NewEmailRepository 创建并返回一个新的 smsRepository 实例 |
| 25 | func NewEmailRepository(cache cache.EmailCache, l *zap.Logger) EmailRepository { |
| 26 | return &emailRepository{ |
| 27 | cache: cache, |
| 28 | l: l, |
| 29 | } |
| 30 | } |
| 31 | |
| 32 | func (e emailRepository) SendCode(ctx context.Context, email string) error { |
| 33 | e.l.Info("[emailRepository.SendCode]", zap.String("email", email)) |