mirror of
https://github.com/andwati/zitadel.git
synced 2026-10-22 23:42:16 +00:00
* feat: dynamic issuer * feat: default language from context * remove zitadel docs from defaults * remove ConsoleOverwriteDir * remove notification endpoints from defaults * custom domains in emails * remove (external) domain * external domain completely removed, console handling fixed * fix test * fix defaults.yaml
38 lines
1.0 KiB
Go
38 lines
1.0 KiB
Go
package notification
|
|
|
|
import (
|
|
"database/sql"
|
|
|
|
"github.com/caos/logging"
|
|
"github.com/rakyll/statik/fs"
|
|
|
|
"github.com/caos/zitadel/internal/crypto"
|
|
|
|
"github.com/caos/zitadel/internal/command"
|
|
"github.com/caos/zitadel/internal/notification/repository/eventsourcing"
|
|
_ "github.com/caos/zitadel/internal/notification/statik"
|
|
"github.com/caos/zitadel/internal/query"
|
|
)
|
|
|
|
type Config struct {
|
|
Repository eventsourcing.Config
|
|
}
|
|
|
|
func Start(config Config,
|
|
externalPort uint16,
|
|
externalSecure bool,
|
|
command *command.Commands,
|
|
queries *query.Queries,
|
|
dbClient *sql.DB,
|
|
assetsPrefix string,
|
|
userEncryption crypto.EncryptionAlgorithm,
|
|
smtpEncryption crypto.EncryptionAlgorithm,
|
|
smsEncryption crypto.EncryptionAlgorithm,
|
|
) {
|
|
statikFS, err := fs.NewWithNamespace("notification")
|
|
logging.OnError(err).Panic("unable to start listener")
|
|
|
|
_, err = eventsourcing.Start(config.Repository, statikFS, externalPort, externalSecure, command, queries, dbClient, assetsPrefix, userEncryption, smtpEncryption, smsEncryption)
|
|
logging.OnError(err).Panic("unable to start app")
|
|
}
|