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

Function notificationRegistryFromContext

pkg/email/notification.go:30–33  ·  view source on GitHub ↗
(ctx context.Context)

Source from the content-addressed store, hash-verified

28var notificationRegistryCtxKey notificationRegistryCtxKeyType
29
30func notificationRegistryFromContext(ctx context.Context) (NotificationRegistry, bool) {
31 reg, ok := ctx.Value(notificationRegistryCtxKey).(NotificationRegistry)
32 return reg, ok
33}
34
35func newContextWithNotificationRegistry(parent context.Context, reg NotificationRegistry) context.Context {
36 return context.WithValue(parent, notificationRegistryCtxKey, reg)

Callers 1

GetNotificationFunction · 0.85

Calls 1

ValueMethod · 0.45

Tested by

no test coverage detected