Compare commits
1 commit
9a5c3c4b08
...
75a6b87671
Author | SHA1 | Date | |
---|---|---|---|
75a6b87671 |
2 changed files with 7 additions and 14 deletions
|
@ -40,18 +40,11 @@ const (
|
||||||
ModeNet
|
ModeNet
|
||||||
)
|
)
|
||||||
|
|
||||||
type BackendConfigType string
|
|
||||||
|
|
||||||
const (
|
|
||||||
Memory BackendConfigType = "memory"
|
|
||||||
SQLite BackendConfigType = "sqlite"
|
|
||||||
)
|
|
||||||
|
|
||||||
type BackendConfig struct {
|
type BackendConfig struct {
|
||||||
Config *oidc.Config `json:"config"`
|
Config *oidc.Config `json:"config"`
|
||||||
Name string `json:"name"`
|
Name string `json:"name"`
|
||||||
ID string `json:"ID"`
|
ID string `json:"ID"`
|
||||||
Type BackendConfigType `json:"type"`
|
Type string `json:"type"`
|
||||||
Local bool `json:"local"`
|
Local bool `json:"local"`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -61,7 +61,7 @@ func main() {
|
||||||
|
|
||||||
storageType, err := initStorage(conf)
|
storageType, err := initStorage(conf)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
logger.L.Fatalf("Failed to initialize storage backend: %s", err.Error())
|
logger.L.Errorf("Failed to initialize storage backend: %s", err.Error())
|
||||||
}
|
}
|
||||||
logger.L.Infof("Initialized storage backend \"%s\"", conf.StorageType)
|
logger.L.Infof("Initialized storage backend \"%s\"", conf.StorageType)
|
||||||
dexConf := dex_server.Config{
|
dexConf := dex_server.Config{
|
||||||
|
@ -99,7 +99,7 @@ func main() {
|
||||||
if err := dexConf.Storage.CreateConnector(storage.Connector{
|
if err := dexConf.Storage.CreateConnector(storage.Connector{
|
||||||
ID: backend.ID,
|
ID: backend.ID,
|
||||||
Name: backend.Name,
|
Name: backend.Name,
|
||||||
Type: string(backend.Type),
|
Type: backend.Type,
|
||||||
Config: backendConfJson,
|
Config: backendConfJson,
|
||||||
}); err != nil {
|
}); err != nil {
|
||||||
logger.L.Errorf("Failed to add connector for backend %q to stage: %s", backend.Name, err.Error())
|
logger.L.Errorf("Failed to add connector for backend %q to stage: %s", backend.Name, err.Error())
|
||||||
|
|
Loading…
Add table
Reference in a new issue