Documentation
¶
Index ¶
- type CityUseCase
- func (u CityUseCase) ById(ctx context.Context, id uint) (entity.City, error)
- func (u CityUseCase) CityList(ctx context.Context, page, size, stateId int, title string) ([]entity.City, error)
- func (u CityUseCase) Count(ctx context.Context) (int, error)
- func (u CityUseCase) Create(context context.Context, title string, state entity.State) (entity.City, error)
- func (u CityUseCase) DeleteById(ctx context.Context, id uint) error
- func (u CityUseCase) DoesCityExist(ctx context.Context, id, stateId uint) bool
- func (u CityUseCase) Update(ctx context.Context, id uint, newInfo map[string]any) (entity.City, error)
- type OTPUseCase
- type StateUseCase
- func (u StateUseCase) Count(ctx context.Context) (int, error)
- func (u StateUseCase) Create(context context.Context, state *entity.State) error
- func (u StateUseCase) DeleteById(ctx context.Context, id uint) error
- func (u StateUseCase) DoesStateExist(ctx context.Context, id uint) bool
- func (u StateUseCase) GetStateById(ctx context.Context, id uint) (entity.State, error)
- func (u StateUseCase) GetStateList(ctx context.Context, page, pageSize int, title string) ([]entity.State, error)
- func (u StateUseCase) Update(ctx context.Context, id uint, newInfo map[string]any) error
- type UserUseCase
- func (u UserUseCase) Count() (int, error)
- func (u UserUseCase) DeleteById(id uint) error
- func (u UserUseCase) DoesUserExist(id uint) bool
- func (u UserUseCase) GetUserById(id uint) (entity.User, error)
- func (u UserUseCase) GetUserOrCreate(mobileNumber string) (*entity.User, error)
- func (u UserUseCase) GetUsersList(pageNumber, pageSize int, mobileNumber, fullName string) ([]entity.User, error)
- func (u UserUseCase) Update(id uint, newInfo map[string]any) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type CityUseCase ¶
type CityUseCase struct {
Repo repository.CityRepository
}
func NewCityUseCase ¶
func NewCityUseCase(repo repository.CityRepository) CityUseCase
func (CityUseCase) DeleteById ¶
func (u CityUseCase) DeleteById(ctx context.Context, id uint) error
func (CityUseCase) DoesCityExist ¶
func (u CityUseCase) DoesCityExist(ctx context.Context, id, stateId uint) bool
type OTPUseCase ¶
type OTPUseCase struct {
Repo repository.OTPCodeRepository
}
func NewOTPCase ¶
func NewOTPCase(otpRepo repository.OTPCodeRepository) OTPUseCase
func (OTPUseCase) GenerateCode ¶
func (OTPUseCase) ValidateCode ¶
type StateUseCase ¶
type StateUseCase struct {
Repo repository.StateRepository
}
func NewStateUseCase ¶
func NewStateUseCase(repo repository.StateRepository) StateUseCase
func (StateUseCase) DeleteById ¶
func (u StateUseCase) DeleteById(ctx context.Context, id uint) error
func (StateUseCase) DoesStateExist ¶
func (u StateUseCase) DoesStateExist(ctx context.Context, id uint) bool
func (StateUseCase) GetStateById ¶
func (StateUseCase) GetStateList ¶
type UserUseCase ¶
type UserUseCase struct {
Repo repository.UserRepository
}
func NewUserUseCase ¶
func NewUserUseCase(userRepo repository.UserRepository) UserUseCase
func (UserUseCase) Count ¶
func (u UserUseCase) Count() (int, error)
func (UserUseCase) DeleteById ¶
func (u UserUseCase) DeleteById(id uint) error
func (UserUseCase) DoesUserExist ¶
func (u UserUseCase) DoesUserExist(id uint) bool
func (UserUseCase) GetUserById ¶
func (u UserUseCase) GetUserById(id uint) (entity.User, error)
func (UserUseCase) GetUserOrCreate ¶
func (u UserUseCase) GetUserOrCreate(mobileNumber string) (*entity.User, error)
func (UserUseCase) GetUsersList ¶
Click to show internal directories.
Click to hide internal directories.