1
0
mirror of https://github.com/Luzifer/cloudkeys-go.git synced 2024-09-19 15:42:58 +00:00
cloudkeys-go/config.go

21 lines
993 B
Go
Raw Permalink Normal View History

2015-07-29 07:01:23 +00:00
package main
import "net/url"
2015-07-29 07:01:23 +00:00
type config struct {
// General Config
PasswordSalt string `env:"passwordSalt" flag:"password-salt" description:"[deprecated] A random unique salt for encrypting the passwords"`
2015-07-29 07:01:23 +00:00
UsernameSalt string `env:"usernameSalt" flag:"username-salt" description:"A random unique salt for encrypting the usernames"`
Storage string `env:"storage" flag:"storage" default:"local:///./data" description:"Configuration for storage adapter (see README.md)"`
2015-07-30 15:25:10 +00:00
Listen string `flag:"listen" env:"listen" default:":3000" description:"IP and port to listen on"`
2015-07-29 07:01:23 +00:00
2015-07-30 15:25:10 +00:00
CookieSigningKey string `flag:"cookie-authkey" env:"authkey" description:"Key used to authenticate the session"`
CookieEncryptKey string `flag:"cookie-encryptkey" env:"encryptkey" description:"Key used to encrypt the session"`
2015-07-29 07:49:23 +00:00
VersionAndQuit bool `flag:"version" default:"false" description:"Show version and quit"`
2015-07-29 07:01:23 +00:00
}
func (c config) ParsedStorage() (*url.URL, error) {
return url.Parse(c.Storage)
}