fix: update config to commands (and queries) (#1342)

* fix: adaot config to commands (and queries)

* remove dependency on vv2 in v1

* add queries user to operator

* set password for queries on tests

* set password for queries on tests

* fix config
This commit is contained in:
Livio Amstutz
2021-02-24 11:17:39 +01:00
committed by GitHub
parent 438daebdb9
commit 8dcbbc87ca
101 changed files with 1122 additions and 1078 deletions

View File

@@ -29,8 +29,8 @@ type Login struct {
router http.Handler
renderer *Renderer
parser *form.Parser
command *command.CommandSide
query *query.QuerySide
command *command.Commands
query *query.Queries
authRepo auth_repository.Repository
baseURL string
zitadelURL string
@@ -60,7 +60,7 @@ const (
handlerPrefix = "/login"
)
func CreateLogin(config Config, command *command.CommandSide, query *query.QuerySide, authRepo *eventsourcing.EsRepository, systemDefaults systemdefaults.SystemDefaults, localDevMode bool) (*Login, string) {
func CreateLogin(config Config, command *command.Commands, query *query.Queries, authRepo *eventsourcing.EsRepository, systemDefaults systemdefaults.SystemDefaults, localDevMode bool) (*Login, string) {
aesCrypto, err := crypto.NewAESCrypto(systemDefaults.IDPConfigVerificationKey)
if err != nil {
logging.Log("HANDL-s90ew").WithError(err).Debug("error create new aes crypto")

View File

@@ -12,6 +12,6 @@ type Config struct {
Handler handler.Config
}
func Start(config Config, command *command.CommandSide, query *query.QuerySide, authRepo *eventsourcing.EsRepository, systemdefaults systemdefaults.SystemDefaults, localDevMode bool) (*handler.Login, string) {
func Start(config Config, command *command.Commands, query *query.Queries, authRepo *eventsourcing.EsRepository, systemdefaults systemdefaults.SystemDefaults, localDevMode bool) (*handler.Login, string) {
return handler.CreateLogin(config.Handler, command, query, authRepo, systemdefaults, localDevMode)
}