(client redis.Cmdable)
| 17 | } |
| 18 | |
| 19 | func NewEmailCache(client redis.Cmdable) EmailCache { |
| 20 | return &emailCache{ |
| 21 | client: client, |
| 22 | } |
| 23 | } |
| 24 | |
| 25 | func (e emailCache) GetVCode(ctx context.Context, email string) (string, error) { |
| 26 | return e.client.Get(ctx, genEmailKey(email)).Result() |