• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

mindersec / minder / 14701580974

28 Apr 2025 06:20AM UTC coverage: 56.887%. First build
14701580974

Pull #5609

github

web-flow
Merge 1ba185623 into 4f29c3363
Pull Request #5609: build(deps): bump gitlab.com/gitlab-org/api/client-go from 0.127.0 to 0.128.0

18357 of 32269 relevant lines covered (56.89%)

36.93 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

0.0
/internal/email/noop/noop.go
1
// SPDX-FileCopyrightText: Copyright 2024 The Minder Authors
2
// SPDX-License-Identifier: Apache-2.0
3

4
// Package noop provides a noop email utilities for minder
5
package noop
6

7
import (
8
        "encoding/json"
9
        "fmt"
10

11
        "github.com/ThreeDotsLabs/watermill/message"
12
        "github.com/rs/zerolog"
13

14
        "github.com/mindersec/minder/internal/email"
15
        "github.com/mindersec/minder/pkg/eventer/interfaces"
16
)
17

18
type noop struct {
19
}
20

21
// New creates a new noop email service
22
func New() *noop {
×
23
        return &noop{}
×
24
}
×
25

26
// Register implements the Consumer interface.
27
func (*noop) Register(reg interfaces.Registrar) {
×
28
        reg.Register(email.TopicQueueInviteEmail, func(msg *message.Message) error {
×
29
                var e email.MailEventPayload
×
30

×
31
                // Get the message context
×
32
                msgCtx := msg.Context()
×
33

×
34
                // Unmarshal the message payload
×
35
                if err := json.Unmarshal(msg.Payload, &e); err != nil {
×
36
                        return fmt.Errorf("error unmarshalling invite email event: %w", err)
×
37
                }
×
38

39
                // Log the email
40
                zerolog.Ctx(msgCtx).Info().
×
41
                        Str("email", e.Address).
×
42
                        Str("subject", e.Subject).
×
43
                        Str("body_text", e.BodyText).
×
44
                        Msg("Sending noop invite email")
×
45

×
46
                return nil
×
47
        })
48
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2025 Coveralls, Inc