File size: 445 Bytes
530729e |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 |
package example
import (
"github.com/GoAdminGroup/go-admin/context"
"github.com/GoAdminGroup/go-admin/modules/auth"
"github.com/GoAdminGroup/go-admin/modules/db"
"github.com/GoAdminGroup/go-admin/modules/service"
)
func (e *Example) initRouter(prefix string, srv service.List) *context.App {
app := context.NewApp()
route := app.Group(prefix)
route.GET("/example", auth.Middleware(db.GetConnection(srv)), e.TestHandler)
return app
}
|