mirror of
https://github.com/zitadel/zitadel.git
synced 2025-08-11 21:37:32 +00:00
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:
24
internal/eventstore/config.go
Normal file
24
internal/eventstore/config.go
Normal file
@@ -0,0 +1,24 @@
|
||||
package eventstore
|
||||
|
||||
import (
|
||||
"github.com/caos/zitadel/internal/config/types"
|
||||
"github.com/caos/zitadel/internal/eventstore/repository/sql"
|
||||
)
|
||||
|
||||
func Start(sqlConfig types.SQL) (*Eventstore, error) {
|
||||
sqlClient, err := sqlConfig.Start()
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return NewEventstore(sql.NewCRDB(sqlClient)), nil
|
||||
}
|
||||
|
||||
func StartWithUser(baseConfig types.SQLBase, userConfig types.SQLUser) (*Eventstore, error) {
|
||||
sqlClient, err := userConfig.Start(baseConfig)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
return NewEventstore(sql.NewCRDB(sqlClient)), nil
|
||||
}
|
Reference in New Issue
Block a user