Beego set up
This commit is contained in:
@@ -9,6 +9,7 @@ import "sync"
|
||||
// ===================================================
|
||||
|
||||
type Config struct {
|
||||
APIPort int
|
||||
NATSUrl string
|
||||
MongoUrl string
|
||||
MongoDatabase string
|
||||
@@ -39,12 +40,13 @@ func GetConfig() *Config {
|
||||
return instance
|
||||
}
|
||||
|
||||
func SetConfig(mongoUrl string, database string, natsUrl string, lokiUrl string, logLevel string) *Config {
|
||||
func SetConfig(mongoUrl string, database string, natsUrl string, lokiUrl string, logLevel string, port int) *Config {
|
||||
GetConfig().MongoUrl = mongoUrl
|
||||
GetConfig().MongoDatabase = database
|
||||
GetConfig().NATSUrl = natsUrl
|
||||
GetConfig().LokiUrl = lokiUrl
|
||||
GetConfig().LogLevel = logLevel
|
||||
GetConfig().Whitelist = true
|
||||
GetConfig().APIPort = port
|
||||
return GetConfig()
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user