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

Function newReq

pkg/auth/rights/cache.go:30–33  ·  view source on GitHub ↗

override this in unit tests

(ctx context.Context)

Source from the content-addressed store, hash-verified

28var now = time.Now // override this in unit tests
29
30func newReq(ctx context.Context) cachedReq {
31 md := rpcmetadata.FromIncomingContext(ctx)
32 return cachedReq{AuthType: md.AuthType, AuthValue: md.AuthValue}
33}
34
35func newEntityReq(ctx context.Context, id *ttnpb.EntityIdentifiers) cachedReq {
36 req := newReq(ctx)

Callers 2

newEntityReqFunction · 0.85
AuthInfoMethod · 0.85

Calls 1

FromIncomingContextFunction · 0.92

Tested by

no test coverage detected