Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
dex
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package registry
Container registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
hdacloud
dex
Commits
3e8907b8
Commit
3e8907b8
authored
8 years ago
by
Eric Chiang
Browse files
Options
Downloads
Patches
Plain Diff
*: add sql storage options to dex application
parent
877eb3dc
No related branches found
No related tags found
No related merge requests found
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
cmd/dex/config.go
+13
-0
13 additions, 0 deletions
cmd/dex/config.go
examples/.gitignore
+1
-0
1 addition, 0 deletions
examples/.gitignore
examples/config-dev.yaml
+3
-2
3 additions, 2 deletions
examples/config-dev.yaml
with
17 additions
and
2 deletions
cmd/dex/config.go
+
13
−
0
View file @
3e8907b8
...
@@ -12,6 +12,7 @@ import (
...
@@ -12,6 +12,7 @@ import (
"github.com/coreos/dex/storage"
"github.com/coreos/dex/storage"
"github.com/coreos/dex/storage/kubernetes"
"github.com/coreos/dex/storage/kubernetes"
"github.com/coreos/dex/storage/memory"
"github.com/coreos/dex/storage/memory"
"github.com/coreos/dex/storage/sql"
)
)
// Config is the config format for the main application.
// Config is the config format for the main application.
...
@@ -71,6 +72,18 @@ func (s *Storage) UnmarshalYAML(unmarshal func(interface{}) error) error {
...
@@ -71,6 +72,18 @@ func (s *Storage) UnmarshalYAML(unmarshal func(interface{}) error) error {
}
}
err
=
unmarshal
(
&
config
)
err
=
unmarshal
(
&
config
)
s
.
Config
=
&
config
.
Config
s
.
Config
=
&
config
.
Config
case
"sqlite3"
:
var
config
struct
{
Config
sql
.
SQLite3
`yaml:"config"`
}
err
=
unmarshal
(
&
config
)
s
.
Config
=
&
config
.
Config
case
"postgres"
:
var
config
struct
{
Config
sql
.
Postgres
`yaml:"config"`
}
err
=
unmarshal
(
&
config
)
s
.
Config
=
&
config
.
Config
default
:
default
:
return
fmt
.
Errorf
(
"unknown storage type %q"
,
storageMeta
.
Type
)
return
fmt
.
Errorf
(
"unknown storage type %q"
,
storageMeta
.
Type
)
}
}
...
...
This diff is collapsed.
Click to expand it.
examples/.gitignore
0 → 100644
+
1
−
0
View file @
3e8907b8
*.db
This diff is collapsed.
Click to expand it.
examples/config-dev.yaml
+
3
−
2
View file @
3e8907b8
issuer
:
http://127.0.0.1:5556
issuer
:
http://127.0.0.1:5556
storage
:
storage
:
# NOTE(ericchiang): This will be replaced by sqlite3 in the future.
type
:
sqlite3
type
:
memory
config
:
file
:
examples/dex.db
web
:
web
:
http
:
127.0.0.1:5556
http
:
127.0.0.1:5556
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment