mirror of
https://github.com/zitadel/zitadel.git
synced 2025-10-18 08:52:26 +00:00
add system config (#71)
This commit is contained in:
@@ -2,8 +2,8 @@ package eventsourcing
|
||||
|
||||
import (
|
||||
"context"
|
||||
sd "github.com/caos/zitadel/internal/config/systemdefaults"
|
||||
|
||||
"github.com/caos/zitadel/internal/crypto"
|
||||
es_int "github.com/caos/zitadel/internal/eventstore"
|
||||
es_proj "github.com/caos/zitadel/internal/project/repository/eventsourcing"
|
||||
)
|
||||
@@ -12,8 +12,6 @@ type Config struct {
|
||||
Eventstore es_int.Config
|
||||
//View view.ViewConfig
|
||||
//Spooler spooler.SpoolerConfig
|
||||
PasswordSaltCost int
|
||||
ClientSecretGenerator crypto.GeneratorConfig
|
||||
}
|
||||
|
||||
type EsRepository struct {
|
||||
@@ -21,7 +19,7 @@ type EsRepository struct {
|
||||
ProjectRepo
|
||||
}
|
||||
|
||||
func Start(conf Config) (*EsRepository, error) {
|
||||
func Start(conf Config, systemDefaults sd.SystemDefaults) (*EsRepository, error) {
|
||||
es, err := es_int.Start(conf.Eventstore)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
@@ -38,11 +36,9 @@ func Start(conf Config) (*EsRepository, error) {
|
||||
//spool := spooler.StartSpooler(conf.Spooler)
|
||||
|
||||
project, err := es_proj.StartProject(es_proj.ProjectConfig{
|
||||
Eventstore: es,
|
||||
Cache: conf.Eventstore.Cache,
|
||||
PasswordSaltCost: conf.PasswordSaltCost,
|
||||
ClientSecretGenerator: conf.ClientSecretGenerator,
|
||||
})
|
||||
Eventstore: es,
|
||||
Cache: conf.Eventstore.Cache,
|
||||
}, systemDefaults)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
Reference in New Issue
Block a user