MCPcopy Index your code
hub / github.com/apache/answer / DelActionType

Method DelActionType

internal/repo/captcha/captcha.go:80–88  ·  view source on GitHub ↗
(ctx context.Context, unit, actionType string)

Source from the content-addressed store, hash-verified

78}
79
80func (cr *captchaRepo) DelActionType(ctx context.Context, unit, actionType string) (err error) {
81 now := time.Now()
82 cacheKey := fmt.Sprintf("ActionRecord:%s@%s@%s", unit, actionType, now.Format("2006-1-02"))
83 err = cr.data.Cache.Del(ctx, cacheKey)
84 if err != nil {
85 err = errors.InternalServer(reason.DatabaseError).WithError(err).WithStack()
86 }
87 return
88}
89
90// SetCaptcha set captcha to cache
91func (cr *captchaRepo) SetCaptcha(ctx context.Context, key, captcha string) (err error) {

Callers

nothing calls this directly

Calls 2

DelMethod · 0.65
FormatMethod · 0.45

Tested by

no test coverage detected