template/service/${REPO_NAME}_svc.go
timerzz 17d2c179fb
Some checks failed
Build image / build (push) Failing after 11s
init 初始化模板
2024-09-04 16:52:46 +08:00

31 lines
724 B
Go

package service
import (
"gitea.timerzz.com/kedaya_haitao/common/pkg/web"
"gitea.timerzz.com/kedaya_haitao/common/structs/storage"
"gitea.timerzz.com/kedaya_haitao/common/structs/utils"
v2 "gitea.timerzz.com/kedaya_haitao/common/structs/v2"
"github.com/gofiber/fiber/v3"
"github.com/henrylee2cn/ameda"
)
type ${REPO_NAME_PASCAL} struct {
storage *storage.Storage
}
func New${REPO_NAME_PASCAL}(storage *storage.Storage) *${REPO_NAME_PASCAL} {
return &${REPO_NAME_PASCAL}{
storage: storage,
}
}
func (s *${REPO_NAME_PASCAL}) Registry(r fiber.Router) {
api := r.Group("/api/v2")
}
func (s *${REPO_NAME_PASCAL}) List(c fiber.Ctx) error {
return c.JSON(web.NewResponse(web.NewListResponse(total, sellers)))
}