feat: setup as separate command (#604)

* feat: separate setup from startup

* health

* move setup config

* add env vars to caos_local.sh

* fix domain and set devMode explicit
This commit is contained in:
Livio Amstutz
2020-08-18 10:04:56 +02:00
committed by GitHub
parent 1a00faf132
commit 8830896199
11 changed files with 311 additions and 143 deletions

View File

@@ -32,7 +32,7 @@ type UserEventstore struct {
es_int.Eventstore
userCache *UserCache
idGenerator id.Generator
defaultDomain string
domain string
PasswordAlg crypto.HashAlgorithm
InitializeUserCode crypto.Generator
EmailVerificationCode crypto.Generator
@@ -68,7 +68,7 @@ func StartUser(conf UserConfig, systemDefaults sd.SystemDefaults) (*UserEventsto
Eventstore: conf.Eventstore,
userCache: userCache,
idGenerator: id.SonyFlakeGenerator,
defaultDomain: systemDefaults.DefaultDomain,
domain: systemDefaults.Domain,
InitializeUserCode: initCodeGen,
EmailVerificationCode: emailVerificationCode,
PhoneVerificationCode: phoneVerificationCode,
@@ -1115,5 +1115,5 @@ func (es *UserEventstore) generateTemporaryLoginName() (string, error) {
if err != nil {
return "", err
}
return fmt.Sprintf("%s@temporary.%s", id, es.defaultDomain), nil
return fmt.Sprintf("%s@temporary.%s", id, es.domain), nil
}