1234567891011121314151617181920212223242526 |
- // @APIVersion 1.0
- // @Title Common API docs of GD.
- // @Description This is common API docs,any developer can test each API in the page.
- // @License Apache 2.0
- // @LicenseUrl http://www.apache.org/licenses/LICENSE-2.0.html
- package routers
- import (
- "gd_gateway/controllers/ctrl_v1"
- "gd_gateway/routers/middleware"
- "github.com/astaxie/beego"
- )
- func init() {
- beego.ErrorHandler("404", notFound)
- api := beego.NewNamespace("/api",
- beego.NSBefore(middleware.ExitCheck),
- beego.NSNamespace("/v1",
- beego.NSInclude(
- &ctrl_v1.CenterController{},
- ),
- ),
- )
- beego.AddNamespace(api)
- }
|