mirror of
https://github.com/httprunner/httprunner.git
synced 2026-06-14 04:09:38 +08:00
27 lines
593 B
Go
27 lines
593 B
Go
package server_ext
|
|
|
|
import (
|
|
"github.com/httprunner/httprunner/v5/server"
|
|
)
|
|
|
|
type RouterExt struct {
|
|
*server.Router
|
|
}
|
|
|
|
func NewExtRouter() *RouterExt {
|
|
router := &RouterExt{
|
|
Router: server.NewRouter(),
|
|
}
|
|
router.Init()
|
|
return router
|
|
}
|
|
|
|
func (r *RouterExt) Init() {
|
|
apiV1PlatformSerial := r.Group("/api/v1").Group("/:platform").Group("/:serial")
|
|
|
|
apiV1PlatformSerial.GET("/stub/source", r.sourceHandler)
|
|
apiV1PlatformSerial.POST("/stub/login", r.loginHandler)
|
|
apiV1PlatformSerial.POST("/stub/logout", r.logoutHandler)
|
|
apiV1PlatformSerial.POST("/app/install", r.installAppHandler)
|
|
}
|