feat: Update project structure and configuration files
This commit is contained in:
42
backend/app/http/routes.gen.go
Normal file
42
backend/app/http/routes.gen.go
Normal file
@@ -0,0 +1,42 @@
|
||||
// Code generated by the atomctl ; DO NOT EDIT.
|
||||
|
||||
package http
|
||||
|
||||
import (
|
||||
"github.com/gofiber/fiber/v3"
|
||||
log "github.com/sirupsen/logrus"
|
||||
_ "go.ipao.vip/atom"
|
||||
_ "go.ipao.vip/atom/contracts"
|
||||
. "go.ipao.vip/atom/fen"
|
||||
"quyun/app/requests"
|
||||
)
|
||||
|
||||
// @provider contracts.HttpRoute atom.GroupRoutes
|
||||
type Routes struct {
|
||||
log *log.Entry `inject:"false"`
|
||||
posts *posts
|
||||
}
|
||||
|
||||
func (r *Routes) Prepare() error {
|
||||
r.log = log.WithField("module", "routes.http")
|
||||
return nil
|
||||
}
|
||||
|
||||
func (r *Routes) Name() string {
|
||||
return "http"
|
||||
}
|
||||
|
||||
func (r *Routes) Register(router fiber.Router) {
|
||||
// 注册路由组: posts
|
||||
router.Get("/v1/posts", DataFunc2(
|
||||
r.posts.List,
|
||||
Query[requests.Pagination]("pagination"),
|
||||
Query[ListQuery]("query"),
|
||||
))
|
||||
|
||||
router.Get("/v1/posts/:id", DataFunc1(
|
||||
r.posts.Show,
|
||||
PathParam[int64]("id"),
|
||||
))
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user