Skip to content
GitLab
Projects
Groups
Snippets
/
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
IRMA
Github mirrors
irmago
Commits
9adf36df
Commit
9adf36df
authored
Jun 15, 2021
by
Sietse Ringers
Browse files
refactor: make keyshare and myirma server db type constants typed
parent
4e2b9d64
Changes
4
Hide whitespace changes
Inline
Side-by-side
irma/cmd/keyshare-myirma.go
View file @
9adf36df
...
...
@@ -44,7 +44,7 @@ func init() {
flags
.
StringSlice
(
"cors-allowed-origins"
,
nil
,
"CORS allowed origins"
)
flags
.
Lookup
(
"port"
)
.
Header
=
`Server address and port to listen on`
flags
.
String
(
"db-type"
,
myirmaserver
.
DBTypePostgres
,
"Type of database to connect keyshare server to"
)
flags
.
String
(
"db-type"
,
string
(
myirmaserver
.
DBTypePostgres
)
,
"Type of database to connect keyshare server to"
)
flags
.
String
(
"db"
,
""
,
"Database server connection string"
)
flags
.
Lookup
(
"db-type"
)
.
Header
=
`Database configuration`
...
...
irma/cmd/keyshare-server.go
View file @
9adf36df
...
...
@@ -41,7 +41,7 @@ func init() {
flags
.
StringP
(
"listen-addr"
,
"l"
,
""
,
"address at which to listen (default 0.0.0.0)"
)
flags
.
Lookup
(
"port"
)
.
Header
=
`Server address and port to listen on`
flags
.
String
(
"db-type"
,
keyshareserver
.
DBTypePostgres
,
"Type of database to connect keyshare server to"
)
flags
.
String
(
"db-type"
,
string
(
keyshareserver
.
DBTypePostgres
)
,
"Type of database to connect keyshare server to"
)
flags
.
String
(
"db"
,
""
,
"Database server connection string"
)
flags
.
Lookup
(
"db-type"
)
.
Header
=
`Database configuration`
...
...
server/keyshare/keyshareserver/conf.go
View file @
9adf36df
...
...
@@ -21,8 +21,8 @@ type DBType string
var
errUnknownDBType
=
errors
.
New
(
"Unknown database type"
)
const
(
DBTypeMemory
=
"memory"
DBTypePostgres
=
"postgres"
DBTypeMemory
DBType
=
"memory"
DBTypePostgres
DBType
=
"postgres"
)
// Configuration contains configuration for the irmaserver library and irmad.
...
...
server/keyshare/myirmaserver/conf.go
View file @
9adf36df
...
...
@@ -17,8 +17,8 @@ type DBType string
var
errUnknownDBType
=
errors
.
New
(
"Unknown database type"
)
const
(
DBTypeMemory
=
"memory"
DBTypePostgres
=
"postgres"
DBTypeMemory
DBType
=
"memory"
DBTypePostgres
DBType
=
"postgres"
SessionLifetimeDefault
=
15
*
60
// seconds
)
...
...
Write
Preview
Supports
Markdown
0%
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!
Cancel
Please
register
or
sign in
to comment