service

package
v2.1.0 Latest Latest
Warning

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

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

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AuthService

type AuthService interface {
	Login(req *models.LoginRequest) (*models.LoginResponse, error)
	ValidateToken(token string) (*auth.Claims, error)
}

AuthService 认证服务接口

func NewAuthService

func NewAuthService(userRepo repository.UserRepository, jwtManager *auth.JWTManager, logger logger.Logger) AuthService

NewAuthService 创建认证服务

type ProductService

type ProductService interface {
	CreateProduct(req *models.CreateProductRequest) (*models.Product, error)
	GetProduct(id uint) (*models.Product, error)
	UpdateProduct(id uint, req *models.UpdateProductRequest) (*models.Product, error)
	DeleteProduct(id uint) error
	ListProducts(query *models.ProductQuery) (*models.ProductListResponse, error)
}

ProductService 产品服务接口

func NewProductService

func NewProductService(repo repository.ProductRepository, cache *cache.RedisClient, logger logger.Logger) ProductService

NewProductService 创建产品服务

type UserService

type UserService interface {
	CreateUser(req *models.CreateUserRequest) (*models.User, error)
	GetUser(id uint) (*models.User, error)
	UpdateUser(id uint, req *models.UpdateUserRequest) (*models.User, error)
	DeleteUser(id uint) error
	ListUsers(page, limit int) ([]*models.User, int64, error)
}

UserService 用户服务接口

func NewUserService

func NewUserService(repo repository.UserRepository, cache *cache.RedisClient, logger logger.Logger) UserService

NewUserService 创建用户服务

Jump to

Keyboard shortcuts

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