Files
go-gin-api/internal/web/controller/authorized_handler/handler.go
T
2021-04-04 21:14:15 +08:00

37 lines
655 B
Go

package authorized_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
ApiView() core.HandlerFunc
ListView() core.HandlerFunc
DemoView() core.HandlerFunc
}
type handler struct {
db db.Repo
logger *zap.Logger
cache cache.Repo
}
func New(logger *zap.Logger, db db.Repo, cache cache.Repo) Handler {
return &handler{
logger: logger,
cache: cache,
db: db,
}
}
func (h *handler) i() {}