Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
D
dex
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
dex
Commits
3e8907b8
Commit
3e8907b8
authored
Oct 03, 2016
by
Eric Chiang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*: add sql storage options to dex application
parent
877eb3dc
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
17 additions
and
2 deletions
+17
-2
config.go
cmd/dex/config.go
+13
-0
.gitignore
examples/.gitignore
+1
-0
config-dev.yaml
examples/config-dev.yaml
+3
-2
No files found.
cmd/dex/config.go
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
)
}
}
...
...
examples/.gitignore
0 → 100644
View file @
3e8907b8
*.db
examples/config-dev.yaml
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
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment