Documentation ¶
Index ¶
- type UserService
- func (service *UserService) All(opts ...*options.FindOptions) (userAll []*models.User, err error)
- func (e *UserService) Count(filter any) (count int, err error)
- func (service *UserService) Delete(id string) (deleteCount int, err error)
- func (service *UserService) DeleteMultiple(filter any) (deleteCount int, err error)
- func (service *UserService) Find(id string) (user *models.User, err error)
- func (service *UserService) FindMultiple(filter any, opts ...*options.FindOptions) (users []*models.User, err error)
- func (e *UserService) GetOverage(age int) (users []*models.User, err error)
- func (e *UserService) GetUnderage(age int) (users []*models.User, err error)
- func (service *UserService) Insert(user *models.User) (insertId string, err error)
- func (service *UserService) InsertMultiple(user []*models.User) (InsertedIDs []string, err error)
- func (e *UserService) Paginate(limit int, currentPage int, filter interface{}) (paginated *orm.Pagination[models.User], err error)
- func (service *UserService) Update(data *models.User) (updateCount int, err error)
- func (service *UserService) UpdateMultiple(filter any, data *models.User) (updateCount int, err error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type UserService ¶
type UserService struct {
// contains filtered or unexported fields
}
func NewUserService ¶
func NewUserService() *UserService
func (*UserService) All ¶
func (service *UserService) All(opts ...*options.FindOptions) (userAll []*models.User, err error)
func (*UserService) Delete ¶
func (service *UserService) Delete(id string) (deleteCount int, err error)
func (*UserService) DeleteMultiple ¶
func (service *UserService) DeleteMultiple(filter any) (deleteCount int, err error)
func (*UserService) Find ¶
func (service *UserService) Find(id string) (user *models.User, err error)
func (*UserService) FindMultiple ¶
func (service *UserService) FindMultiple(filter any, opts ...*options.FindOptions) (users []*models.User, err error)
func (*UserService) GetOverage ¶
func (e *UserService) GetOverage(age int) (users []*models.User, err error)
func (*UserService) GetUnderage ¶
func (e *UserService) GetUnderage(age int) (users []*models.User, err error)
func (*UserService) Insert ¶
func (service *UserService) Insert(user *models.User) (insertId string, err error)
func (*UserService) InsertMultiple ¶
func (service *UserService) InsertMultiple(user []*models.User) (InsertedIDs []string, err error)
func (*UserService) Paginate ¶
func (e *UserService) Paginate(limit int, currentPage int, filter interface{}) (paginated *orm.Pagination[models.User], err error)
func (*UserService) Update ¶
func (service *UserService) Update(data *models.User) (updateCount int, err error)
func (*UserService) UpdateMultiple ¶
Click to show internal directories.
Click to hide internal directories.