21 lines
921 B
Go
21 lines
921 B
Go
package notifications
|
|
|
|
import (
|
|
"github.com/tech/sendico/pkg/db/account"
|
|
messaging "github.com/tech/sendico/pkg/messaging/envelope"
|
|
cinternal "github.com/tech/sendico/pkg/messaging/internal/notifications/confirmation"
|
|
ch "github.com/tech/sendico/pkg/messaging/notifications/confirmation/handler"
|
|
np "github.com/tech/sendico/pkg/messaging/notifications/processor"
|
|
"github.com/tech/sendico/pkg/mlogger"
|
|
"github.com/tech/sendico/pkg/model"
|
|
"go.mongodb.org/mongo-driver/v2/bson"
|
|
)
|
|
|
|
func Code(sender string, accountRef bson.ObjectID, destination string, target model.ConfirmationTarget, code string) messaging.Envelope {
|
|
return cinternal.NewConfirmationCodeEnvelope(sender, accountRef, destination, target, code)
|
|
}
|
|
|
|
func NewConfirmationCodeProcessor(logger mlogger.Logger, db account.DB, handler ch.ConfirmationCodeHandler) np.EnvelopeProcessor {
|
|
return cinternal.NewConfirmationCodeProcessor(logger, db, handler)
|
|
}
|