Count 获取当天发送短信的次数
(ctx context.Context, number string)
| 83 | |
| 84 | // Count 获取当天发送短信的次数 |
| 85 | func (s *smsCache) Count(ctx context.Context, number string) int { |
| 86 | key := getCountKey(number, time.Now()) |
| 87 | res, _ := strconv.ParseInt(s.client.Get(ctx, key).Val(), 10, 64) |
| 88 | return int(res) |
| 89 | } |
| 90 | |
| 91 | // IncrCnt 增加当天发送短信的次数 |
| 92 | func (s *smsCache) IncrCnt(ctx context.Context, number string) error { |
nothing calls this directly
no test coverage detected