services

package
v0.0.0-...-696786a Latest Latest
Warning

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

Go to latest
Published: Jan 4, 2025 License: MIT Imports: 4 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(repo *repositories.UserRepository) *UserService

func (*UserService) Create

func (s *UserService) Create(ctx context.Context, user *models.User) error

func (*UserService) Delete

func (s *UserService) Delete(ctx context.Context, id primitive.ObjectID) error

func (*UserService) FindOne

func (s *UserService) FindOne(ctx context.Context, filter interface{}) (*models.User, error)

func (*UserService) GetAll

func (s *UserService) GetAll(ctx context.Context) ([]models.User, error)

func (*UserService) GetByID

func (s *UserService) GetByID(ctx context.Context, id primitive.ObjectID) (*models.User, error)

func (*UserService) Update

func (s *UserService) Update(ctx context.Context, user *models.User) error

Jump to

Keyboard shortcuts

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