Documentation
¶
Index ¶
Constants ¶
View Source
const GLOBAL_CONFIG_FQDN_KEY = "fqdn"
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type OsReadFile ¶
OsReadFile defines a function type for reading a file from the given name and returning its contents as bytes.
type Sender ¶
type Sender struct {
// contains filtered or unexported fields
}
Sender provides functionality to send emails using a configured SMTP service.
func CreateSender ¶
func CreateSender(config configuration.Smtp, sourceInstance string, attachments []string, globalConfigRepo globalConfigRepo) *Sender
CreateSender initializes and returns a new Sender instance with the provided configuration, sender service, and file reader.
func (*Sender) Send ¶
func (s *Sender) Send(ctx context.Context, isFinal bool, migrationResult error, start time.Time, end time.Time) error
Send composes and sends an email containing the result of a migration operation.
The email includes a plain text body summarizing the migration status and optional file attachments. It uses multipart MIME encoding to support attachments and plain text.
Parameters:
- success: Indicates whether the migration was successful.
- attachments: List of file paths to include as attachments in the email.
- sourceInstance: URL of the source system
- targetInstance: URL of the target system.
- start: Start time of the migration.
- end: End time of the migration.
- isFinal: Whether this is the final report of a migration process.
Returns an error if email composition or sending fails.
Click to show internal directories.
Click to hide internal directories.