services

package
v1.4.13 Latest Latest
Warning

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

Go to latest
Published: Apr 17, 2023 License: MIT Imports: 6 Imported by: 0

Documentation

Index

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) Count

func (e *UserService) Count(filter any) (count int, 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

func (service *UserService) UpdateMultiple(filter any, data *models.User) (updateCount int, err error)

Jump to

Keyboard shortcuts

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