| 34 | } |
| 35 | |
| 36 | type StoreEnqueuer struct { |
| 37 | store Store |
| 38 | log slog.Logger |
| 39 | |
| 40 | defaultMethod database.NotificationMethod |
| 41 | defaultEnabled bool |
| 42 | inboxEnabled bool |
| 43 | |
| 44 | // helpers holds a map of template funcs which are used when rendering templates. These need to be passed in because |
| 45 | // the template funcs will return values which are inappropriately encapsulated in this struct. |
| 46 | helpers template.FuncMap |
| 47 | // Used to manipulate time in tests. |
| 48 | clock quartz.Clock |
| 49 | } |
| 50 | |
| 51 | // NewStoreEnqueuer creates an Enqueuer implementation which can persist notification messages in the store. |
| 52 | func NewStoreEnqueuer(cfg codersdk.NotificationsConfig, store Store, helpers template.FuncMap, log slog.Logger, clock quartz.Clock) (*StoreEnqueuer, error) { |
nothing calls this directly
no outgoing calls
no test coverage detected