mirror of
https://github.com/xinliangnote/go-gin-api.git
synced 2024-04-21 12:31:46 +00:00
- 新增数据表:cron_task; - 后台新增后台任务模块,支持(创建、编辑、启用/禁用、列表); - 调整项目初始化,使其支持安装后台任务模块; - 调整服务升级指引,1.2.6 -> 1.2.7;
34 lines
591 B
Go
34 lines
591 B
Go
package cron_handler
|
|
|
|
import (
|
|
"github.com/xinliangnote/go-gin-api/internal/pkg/cache"
|
|
"github.com/xinliangnote/go-gin-api/internal/pkg/core"
|
|
"github.com/xinliangnote/go-gin-api/internal/pkg/db"
|
|
|
|
"go.uber.org/zap"
|
|
)
|
|
|
|
var _ Handler = (*handler)(nil)
|
|
|
|
type Handler interface {
|
|
i()
|
|
|
|
AddView() core.HandlerFunc
|
|
EditView() core.HandlerFunc
|
|
ListView() core.HandlerFunc
|
|
}
|
|
|
|
type handler struct {
|
|
logger *zap.Logger
|
|
cache cache.Repo
|
|
}
|
|
|
|
func New(logger *zap.Logger, db db.Repo, cache cache.Repo) Handler {
|
|
return &handler{
|
|
logger: logger,
|
|
cache: cache,
|
|
}
|
|
}
|
|
|
|
func (h *handler) i() {}
|