MCPcopy Create free account
hub / github.com/GoSimplicity/LinkMe / Count

Method Count

internal/repository/cache/sms.go:85–89  ·  view source on GitHub ↗

Count 获取当天发送短信的次数

(ctx context.Context, number string)

Source from the content-addressed store, hash-verified

83
84// Count 获取当天发送短信的次数
85func (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 增加当天发送短信的次数
92func (s *smsCache) IncrCnt(ctx context.Context, number string) error {

Callers

nothing calls this directly

Calls 2

getCountKeyFunction · 0.85
GetMethod · 0.65

Tested by

no test coverage detected