Documentation ¶
Index ¶
- type CreateUserInputDto
- type CreateUserOutputDto
- type CreateUserUseCase
- type DeleteUserInputDto
- type DeleteUserOutputDto
- type DeleteUserUseCase
- type GetAllUsersOutputDto
- type GetAllUsersUseCase
- type GetUserByIDInputDto
- type GetUserByIDOutputDto
- type GetUserByIDUseCase
- type PromotionUseCase
- type UpdateUserInputDto
- type UpdateUserOutputDto
- type UpdateUserUseCase
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CreateUserInputDto ¶
type CreateUserOutputDto ¶
type CreateUserUseCase ¶
type CreateUserUseCase struct {
UserRepository entity.UserRepository
}
func NewCreateUserUseCase ¶
func NewCreateUserUseCase(UserRepository entity.UserRepository) *CreateUserUseCase
func (*CreateUserUseCase) Execute ¶
func (u *CreateUserUseCase) Execute(input CreateUserInputDto) (*CreateUserOutputDto, error)
type DeleteUserInputDto ¶
type DeleteUserInputDto struct {
ID uint `json:"id"`
}
type DeleteUserOutputDto ¶
type DeleteUserOutputDto struct {
ID uint `json:"id"`
}
type DeleteUserUseCase ¶
type DeleteUserUseCase struct {
UserRepository entity.UserRepository
}
func NewDeleteUserUseCase ¶
func NewDeleteUserUseCase(UserRepository entity.UserRepository) *DeleteUserUseCase
func (*DeleteUserUseCase) Execute ¶
func (u *DeleteUserUseCase) Execute(input DeleteUserInputDto) (*DeleteUserOutputDto, error)
type GetAllUsersOutputDto ¶
type GetAllUsersUseCase ¶
type GetAllUsersUseCase struct {
UserRepository entity.UserRepository
}
func NewGetAllUsersUseCase ¶
func NewGetAllUsersUseCase(UserRepository entity.UserRepository) *GetAllUsersUseCase
func (*GetAllUsersUseCase) Execute ¶
func (u *GetAllUsersUseCase) Execute() (*GetAllUsersOutputDto, error)
type GetUserByIDInputDto ¶
type GetUserByIDInputDto struct {
ID uint `json:"id"`
}
type GetUserByIDOutputDto ¶
type GetUserByIDUseCase ¶
type GetUserByIDUseCase struct {
UserRepository entity.UserRepository
}
func NewGetUserByIDUseCase ¶
func NewGetUserByIDUseCase(UserRepository entity.UserRepository) *GetUserByIDUseCase
func (*GetUserByIDUseCase) Execute ¶
func (u *GetUserByIDUseCase) Execute(input GetUserByIDInputDto) (*GetUserByIDOutputDto, error)
type PromotionUseCase ¶
type PromotionUseCase struct {
// contains filtered or unexported fields
}
func NewPromotionUseCase ¶
func NewPromotionUseCase(repo entity.PromotionRepository) *PromotionUseCase
func (*PromotionUseCase) ApplyPromotion ¶
func (uc *PromotionUseCase) ApplyPromotion(promoID uint, userIDs []int) error
func (*PromotionUseCase) GetAppliedUsers ¶
func (uc *PromotionUseCase) GetAppliedUsers(promoID uint) ([]int, error)
func (*PromotionUseCase) GetAvailableUsers ¶
func (uc *PromotionUseCase) GetAvailableUsers(promoType int) ([]int, error)
type UpdateUserInputDto ¶
type UpdateUserOutputDto ¶
type UpdateUserUseCase ¶
type UpdateUserUseCase struct {
UserRepository entity.UserRepository
}
func NewUpdateUserUseCase ¶
func NewUpdateUserUseCase(UserRepository entity.UserRepository) *UpdateUserUseCase
func (*UpdateUserUseCase) Execute ¶
func (u *UpdateUserUseCase) Execute(input UpdateUserInputDto) (*UpdateUserOutputDto, error)
Click to show internal directories.
Click to hide internal directories.