mirror of
https://github.com/zitadel/zitadel.git
synced 2024-12-13 03:24:26 +00:00
5463244376
* enable overwrite of adminUser fields in defaults.yaml * create schema and table * cli: create keys * cli: create keys * read encryptionkey from db * merge v2 * file names * cleanup defaults.yaml * remove custom errors * load encryptionKeys on start * cleanup * fix merge * update system defaults * fix error message
38 lines
1.1 KiB
Go
38 lines
1.1 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"
|
|
sd "github.com/caos/zitadel/internal/config/systemdefaults"
|
|
"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,
|
|
systemDefaults sd.SystemDefaults,
|
|
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, systemDefaults, command, queries, dbClient, assetsPrefix, userEncryption, smtpEncryption, smsEncryption)
|
|
logging.OnError(err).Panic("unable to start app")
|
|
}
|