diff options
author | =Corey Hulen <corey@hulen.com> | 2015-09-21 20:38:31 -0700 |
---|---|---|
committer | =Corey Hulen <corey@hulen.com> | 2015-09-21 20:38:31 -0700 |
commit | afcff9b301ed45687ab7021709af8b2cf338355b (patch) | |
tree | 55f8c51b6c012e5663b77bd88e202f4aa21a3d9c /model | |
parent | e78c79b83213efc40bffc5ef42071fedb85d6061 (diff) | |
download | chat-afcff9b301ed45687ab7021709af8b2cf338355b.tar.gz chat-afcff9b301ed45687ab7021709af8b2cf338355b.tar.bz2 chat-afcff9b301ed45687ab7021709af8b2cf338355b.zip |
Fixing unit tests
Diffstat (limited to 'model')
-rw-r--r-- | model/config.go | 14 |
1 files changed, 12 insertions, 2 deletions
diff --git a/model/config.go b/model/config.go index d4eb1e714..31af619a5 100644 --- a/model/config.go +++ b/model/config.go @@ -15,6 +15,8 @@ const ( IMAGE_DRIVER_LOCAL = "local" IMAGE_DRIVER_S3 = "amazons3" + + SERVICE_GITLAB = "gitlab" ) type ServiceSettings struct { @@ -34,7 +36,7 @@ type ServiceSettings struct { GoogleDeveloperKey string } -type SSOSetting struct { +type SSOSettings struct { Allow bool Secret string Id string @@ -129,7 +131,7 @@ type Config struct { EmailSettings EmailSettings RateLimitSettings RateLimitSettings PrivacySettings PrivacySettings - SSOSettings map[string]SSOSetting + GitLabSSOSettings SSOSettings } func (o *Config) ToJson() string { @@ -141,6 +143,14 @@ func (o *Config) ToJson() string { } } +func (o *Config) GetSSOService(service string) *SSOSettings { + if service == SERVICE_GITLAB { + return &o.GitLabSSOSettings + } + + return nil +} + func ConfigFromJson(data io.Reader) *Config { decoder := json.NewDecoder(data) var o Config |