Initial commit
This commit is contained in:
7
conf/app.conf
Normal file
7
conf/app.conf
Normal file
@@ -0,0 +1,7 @@
|
||||
appname = oc-auth
|
||||
httpport = 8080
|
||||
runmode = dev
|
||||
autorender = false
|
||||
copyrequestbody = true
|
||||
EnableDocs = true
|
||||
sqlconn =
|
||||
20
conf/config.go
Normal file
20
conf/config.go
Normal file
@@ -0,0 +1,20 @@
|
||||
package conf
|
||||
|
||||
import "sync"
|
||||
|
||||
type Config struct {
|
||||
NatsUrl string
|
||||
NatsLogin string
|
||||
NatsPassword string
|
||||
OidcUrl string
|
||||
}
|
||||
|
||||
var instance *Config
|
||||
var once sync.Once
|
||||
|
||||
func GetConfig() *Config {
|
||||
once.Do(func() {
|
||||
instance = &Config{}
|
||||
})
|
||||
return instance
|
||||
}
|
||||
Reference in New Issue
Block a user