Documentation
¶
Index ¶
- Variables
- func Bind[T any](r *http.Request) (*T, error)
- func Error(w http.ResponseWriter, code int, format string, args ...any)
- func ErrorSystem(w http.ResponseWriter)
- func Paginate[T any](r *http.Request, items []T) (pagedItems []T, total uint)
- func Success(w http.ResponseWriter, data any)
- type ErrorResponse
- type SuccessResponse
- type UserService
- func (s *UserService) Create(w http.ResponseWriter, r *http.Request)
- func (s *UserService) Delete(w http.ResponseWriter, r *http.Request)
- func (s *UserService) Get(w http.ResponseWriter, r *http.Request)
- func (s *UserService) List(w http.ResponseWriter, r *http.Request)
- func (s *UserService) Update(w http.ResponseWriter, r *http.Request)
Constants ¶
This section is empty.
Variables ¶
View Source
var ProviderSet = wire.NewSet(NewUserService)
ProviderSet is service providers.
Functions ¶
Types ¶
type SuccessResponse ¶
SuccessResponse 通用成功响应
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService(user biz.UserRepo) *UserService
func (*UserService) Create ¶
func (s *UserService) Create(w http.ResponseWriter, r *http.Request)
func (*UserService) Delete ¶
func (s *UserService) Delete(w http.ResponseWriter, r *http.Request)
func (*UserService) Get ¶
func (s *UserService) Get(w http.ResponseWriter, r *http.Request)
func (*UserService) List ¶
func (s *UserService) List(w http.ResponseWriter, r *http.Request)
func (*UserService) Update ¶
func (s *UserService) Update(w http.ResponseWriter, r *http.Request)
Click to show internal directories.
Click to hide internal directories.