MCPcopy Create free account
hub / github.com/bytebase/bytebase / refreshToken

Method refreshToken

backend/plugin/webhook/dingtalk/app.go:54–61  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

52}
53
54func (p *provider) refreshToken(ctx context.Context) error {
55 token, err := getTokenCached(ctx, p.c, p.id, p.secret)
56 if err != nil {
57 return errors.Wrapf(err, "failed to get token")
58 }
59 p.token = token
60 return nil
61}
62
63var userIDCache = func() *lru.Cache[string, string] {
64 cache, err := lru.New[string, string](5000)

Callers 2

doMethod · 0.95
ValidateFunction · 0.45

Calls 1

getTokenCachedFunction · 0.70

Tested by

no test coverage detected