MCPcopy Create free account
hub / github.com/TheThingsNetwork/lorawan-stack / cacheInContext

Function cacheInContext

pkg/auth/rights/rights.go:172–176  ·  view source on GitHub ↗
(ctx context.Context, f func(*Rights))

Source from the content-addressed store, hash-verified

170}
171
172func cacheInContext(ctx context.Context, f func(*Rights)) {
173 if rights, ok := ctx.Value(rightsCacheKey).(*Rights); ok {
174 f(rights)
175 }
176}
177
178func cacheFromContext(ctx context.Context) (*Rights, bool) {
179 if rights, ok := ctx.Value(rightsCacheKey).(*Rights); ok {

Callers 5

ListApplicationFunction · 0.85
ListClientFunction · 0.85
ListGatewayFunction · 0.85
ListOrganizationFunction · 0.85
ListUserFunction · 0.85

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected