MCPcopy Create free account
hub / github.com/TruthHun/BookStack / clearExpireSign

Function clearExpireSign

utils/jwt.go:35–43  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

33}
34
35func clearExpireSign() {
36 // 清除超过24小时
37 usedSign.Range(func(signMD5, timestamp interface{}) bool {
38 if time.Now().Unix()-timestamp.(int64) > MediaDuration {
39 usedSign.Delete(signMD5)
40 }
41 return true
42 })
43}
44
45// IsSignUsed 签名是否已被使用
46func IsSignUsed(sign string) bool {

Callers 1

initFunction · 0.85

Calls 1

DeleteMethod · 0.45

Tested by

no test coverage detected