Compare commits
2 Commits
05e041cccf
...
17aeef4ad0
Author | SHA1 | Date | |
---|---|---|---|
|
17aeef4ad0 | ||
|
e9ff0bd58c |
4
main.go
4
main.go
@ -16,7 +16,7 @@ func main() {
|
|||||||
// Load the right config file
|
// Load the right config file
|
||||||
o := oclib.GetConfLoader()
|
o := oclib.GetConfLoader()
|
||||||
|
|
||||||
// feed the library with the loaded config,
|
// feed the library with the loaded config
|
||||||
oclib.SetConfig(
|
oclib.SetConfig(
|
||||||
o.GetStringDefault("MONGO_URL", "mongodb://127.0.0.1:27017"),
|
o.GetStringDefault("MONGO_URL", "mongodb://127.0.0.1:27017"),
|
||||||
o.GetStringDefault("MONGO_DATABASE", "DC_myDC"),
|
o.GetStringDefault("MONGO_DATABASE", "DC_myDC"),
|
||||||
@ -29,6 +29,6 @@ func main() {
|
|||||||
beego.BConfig.Listen.HTTPPort = o.GetIntDefault("port", 8080)
|
beego.BConfig.Listen.HTTPPort = o.GetIntDefault("port", 8080)
|
||||||
beego.BConfig.WebConfig.DirectoryIndex = true
|
beego.BConfig.WebConfig.DirectoryIndex = true
|
||||||
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
|
beego.BConfig.WebConfig.StaticDir["/swagger"] = "swagger"
|
||||||
//}
|
|
||||||
beego.Run()
|
beego.Run()
|
||||||
}
|
}
|
||||||
|
BIN
oc-catalog
Executable file
BIN
oc-catalog
Executable file
Binary file not shown.
@ -1,10 +1,10 @@
|
|||||||
// @APIVersion 1.0.0
|
// @APIVersion 1.0.0
|
||||||
// @Title beego Test API
|
// @Title oc-catalog
|
||||||
// @Description beego has a very cool tools to autogenerate documents for your API
|
// @Description OpenCloud catalog
|
||||||
// @Contact astaxie@gmail.com
|
// @Contact admin@o-cloud.io
|
||||||
// @TermsOfServiceUrl http://beego.me/
|
// @TermsOfServiceUrl http://cloud.o-forge.io/
|
||||||
// @License Apache 2.0
|
// @License MIT
|
||||||
// @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
|
// @LicenseUrl https://opensource.org/license/mit
|
||||||
package routers
|
package routers
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
@ -1,16 +1,16 @@
|
|||||||
{
|
{
|
||||||
"swagger": "2.0",
|
"swagger": "2.0",
|
||||||
"info": {
|
"info": {
|
||||||
"title": "beego Test API",
|
"title": "oc-catalog",
|
||||||
"description": "beego has a very cool tools to autogenerate documents for your API\n",
|
"description": "OpenCloud catalog\n",
|
||||||
"version": "1.0.0",
|
"version": "1.0.0",
|
||||||
"termsOfService": "http://beego.me/",
|
"termsOfService": "http://cloud.o-forge.io/",
|
||||||
"contact": {
|
"contact": {
|
||||||
"email": "astaxie@gmail.com"
|
"email": "admin@o-cloud.io"
|
||||||
},
|
},
|
||||||
"license": {
|
"license": {
|
||||||
"name": "Apache 2.0",
|
"name": "MIT",
|
||||||
"url": "http://www.apache.org/licenses/LICENSE-2.0.html"
|
"url": "https://opensource.org/license/mit"
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
"basePath": "/oc/",
|
"basePath": "/oc/",
|
||||||
|
@ -1,15 +1,15 @@
|
|||||||
swagger: "2.0"
|
swagger: "2.0"
|
||||||
info:
|
info:
|
||||||
title: beego Test API
|
title: oc-catalog
|
||||||
description: |
|
description: |
|
||||||
beego has a very cool tools to autogenerate documents for your API
|
OpenCloud catalog
|
||||||
version: 1.0.0
|
version: 1.0.0
|
||||||
termsOfService: http://beego.me/
|
termsOfService: http://cloud.o-forge.io/
|
||||||
contact:
|
contact:
|
||||||
email: astaxie@gmail.com
|
email: admin@o-cloud.io
|
||||||
license:
|
license:
|
||||||
name: Apache 2.0
|
name: MIT
|
||||||
url: http://www.apache.org/licenses/LICENSE-2.0.html
|
url: https://opensource.org/license/mit
|
||||||
basePath: /oc/
|
basePath: /oc/
|
||||||
paths:
|
paths:
|
||||||
/data/:
|
/data/:
|
||||||
|
Loading…
Reference in New Issue
Block a user