65 lines
2.4 KiB
Go
65 lines
2.4 KiB
Go
package routers
|
|
|
|
import (
|
|
beego "github.com/beego/beego/v2/server/web"
|
|
"github.com/beego/beego/v2/server/web/context/param"
|
|
)
|
|
|
|
func init() {
|
|
|
|
beego.GlobalControllerRouter["oc-peers/controllers:PeerController"] = append(beego.GlobalControllerRouter["oc-peers/controllers:PeerController"],
|
|
beego.ControllerComments{
|
|
Method: "GetAll",
|
|
Router: `/`,
|
|
AllowHTTPMethods: []string{"get"},
|
|
MethodParams: param.Make(),
|
|
Filters: nil,
|
|
Params: nil})
|
|
|
|
beego.GlobalControllerRouter["oc-peers/controllers:PeerController"] = append(beego.GlobalControllerRouter["oc-peers/controllers:PeerController"],
|
|
beego.ControllerComments{
|
|
Method: "Put",
|
|
Router: `/:id`,
|
|
AllowHTTPMethods: []string{"put"},
|
|
MethodParams: param.Make(),
|
|
Filters: nil,
|
|
Params: nil})
|
|
|
|
beego.GlobalControllerRouter["oc-peers/controllers:PeerController"] = append(beego.GlobalControllerRouter["oc-peers/controllers:PeerController"],
|
|
beego.ControllerComments{
|
|
Method: "Get",
|
|
Router: `/:id`,
|
|
AllowHTTPMethods: []string{"get"},
|
|
MethodParams: param.Make(),
|
|
Filters: nil,
|
|
Params: nil})
|
|
|
|
beego.GlobalControllerRouter["oc-peers/controllers:PeerController"] = append(beego.GlobalControllerRouter["oc-peers/controllers:PeerController"],
|
|
beego.ControllerComments{
|
|
Method: "Search",
|
|
Router: `/search/:search`,
|
|
AllowHTTPMethods: []string{"get"},
|
|
MethodParams: param.Make(),
|
|
Filters: nil,
|
|
Params: nil})
|
|
|
|
beego.GlobalControllerRouter["oc-peers/controllers:StatusController"] = append(beego.GlobalControllerRouter["oc-peers/controllers:StatusController"],
|
|
beego.ControllerComments{
|
|
Method: "Get",
|
|
Router: `/`,
|
|
AllowHTTPMethods: []string{"post"},
|
|
MethodParams: param.Make(),
|
|
Filters: nil,
|
|
Params: nil})
|
|
|
|
beego.GlobalControllerRouter["oc-peers/controllers:VersionController"] = append(beego.GlobalControllerRouter["oc-peers/controllers:VersionController"],
|
|
beego.ControllerComments{
|
|
Method: "GetAll",
|
|
Router: `/`,
|
|
AllowHTTPMethods: []string{"get"},
|
|
MethodParams: param.Make(),
|
|
Filters: nil,
|
|
Params: nil})
|
|
|
|
}
|