api

package
v1.1.1 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 20, 2025 License: AGPL-3.0 Imports: 8 Imported by: 0

Documentation

Index

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) CreateProduct

func (h *Handler) CreateProduct(c *gin.Context)

CreateProduct 创建产品

func (*Handler) CreateUser

func (h *Handler) CreateUser(c *gin.Context)

CreateUser 创建用户

func (*Handler) DeleteProduct

func (h *Handler) DeleteProduct(c *gin.Context)

DeleteProduct 删除产品

func (*Handler) DeleteUser

func (h *Handler) DeleteUser(c *gin.Context)

DeleteUser 删除用户

func (*Handler) GetProduct

func (h *Handler) GetProduct(c *gin.Context)

GetProduct 获取产品

func (*Handler) GetUser

func (h *Handler) GetUser(c *gin.Context)

GetUser 获取用户

func (*Handler) Health

func (h *Handler) Health(c *gin.Context)

Health 健康检查

func (*Handler) ListProducts

func (h *Handler) ListProducts(c *gin.Context)

ListProducts 获取产品列表

func (*Handler) ListUsers

func (h *Handler) ListUsers(c *gin.Context)

ListUsers 获取用户列表

func (*Handler) Login

func (h *Handler) Login(c *gin.Context)

Login 用户登录

func (*Handler) SetupRoutes

func (h *Handler) SetupRoutes(router *gin.Engine, jwtManager *auth.JWTManager)

SetupRoutes 设置路由

func (*Handler) UpdateProduct

func (h *Handler) UpdateProduct(c *gin.Context)

UpdateProduct 更新产品

func (*Handler) UpdateUser

func (h *Handler) UpdateUser(c *gin.Context)

UpdateUser 更新用户

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL