Documentation
¶
Index ¶
- type Handler
- func (h *Handler) CreateProduct(c *gin.Context)
- func (h *Handler) CreateUser(c *gin.Context)
- func (h *Handler) DeleteProduct(c *gin.Context)
- func (h *Handler) DeleteUser(c *gin.Context)
- func (h *Handler) GetProduct(c *gin.Context)
- func (h *Handler) GetUser(c *gin.Context)
- func (h *Handler) Health(c *gin.Context)
- func (h *Handler) ListProducts(c *gin.Context)
- func (h *Handler) ListUsers(c *gin.Context)
- func (h *Handler) Login(c *gin.Context)
- func (h *Handler) SetupRoutes(router *gin.Engine, jwtManager *auth.JWTManager)
- func (h *Handler) UpdateProduct(c *gin.Context)
- func (h *Handler) UpdateUser(c *gin.Context)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Handler ¶
type Handler struct {
// contains filtered or unexported fields
}
Handler API处理器
func NewHandler ¶
func NewHandler(userService service.UserService, productService service.ProductService, authService service.AuthService, logger logger.Logger) *Handler
NewHandler 创建API处理器
func (*Handler) SetupRoutes ¶
func (h *Handler) SetupRoutes(router *gin.Engine, jwtManager *auth.JWTManager)
SetupRoutes 设置路由
Click to show internal directories.
Click to hide internal directories.