MCPcopy Create free account
hub / github.com/devinterface/startersaas-go-api / initDabatase

Function initDabatase

main.go:26–40  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

24)
25
26func initDabatase() {
27 monitor := &event.CommandMonitor{
28 Started: func(_ context.Context, e *event.CommandStartedEvent) {
29 //fmt.Println(e.Command)
30 },
31 Succeeded: func(_ context.Context, e *event.CommandSucceededEvent) {
32 //fmt.Println(e.Reply)
33 },
34 Failed: func(_ context.Context, e *event.CommandFailedEvent) {
35 //fmt.Println(e.Failure)
36 },
37 }
38 opts := options.Client().SetMonitor(monitor)
39 mgm.SetDefaultConfig(nil, os.Getenv("DATABASE"), options.Client().ApplyURI(os.Getenv("DATABASE_URI")), opts)
40}
41func runScheduledNotifications() (err error) {
42 var subscriptionService = services.SubscriptionService{}
43 subscriptionService.RunNotifyExpiringTrials()

Callers 1

mainFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected