feat: mail service

This commit is contained in:
Ilia Denisov
2026-04-17 18:39:16 +02:00
committed by GitHub
parent 23ffcb7535
commit 5b7593e6f6
183 changed files with 31215 additions and 248 deletions
+23
View File
@@ -0,0 +1,23 @@
// Package id provides internal identifier generators used by Mail Service.
package id
import (
"fmt"
"galaxy/mail/internal/domain/common"
"github.com/google/uuid"
)
// Generator builds UUID-backed internal delivery identifiers.
type Generator struct{}
// NewDeliveryID returns one new UUID v4 delivery identifier.
func (Generator) NewDeliveryID() (common.DeliveryID, error) {
value, err := uuid.NewRandom()
if err != nil {
return "", fmt.Errorf("new delivery id: %w", err)
}
return common.DeliveryID(value.String()), nil
}