Documentation ¶
Index ¶
- type TaskRepository
- func (r *TaskRepository) Add(task pkgmodels.Task) error
- func (r *TaskRepository) FindAll() ([]pkgmodels.Task, error)
- func (r *TaskRepository) FindById(id string) (*pkgmodels.Task, error)
- func (r *TaskRepository) Remove(id string) error
- func (r *TaskRepository) Update(id string, task pkgmodels.Task) error
- type UserRepository
- func (r *UserRepository) Add(user pkgmodels.User) error
- func (r *UserRepository) FindAll() ([]pkgmodels.User, error)
- func (r *UserRepository) FindByEmail(email string) (*pkgmodels.User, error)
- func (r *UserRepository) FindById(id string) (*pkgmodels.User, error)
- func (r *UserRepository) Remove(id string) error
- func (r *UserRepository) Update(id string, user pkgmodels.User) error
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TaskRepository ¶
type TaskRepository struct { DB *mongo.Client Collection *mongo.Collection }
func NewTaskRepository ¶
func NewTaskRepository(db *mongo.Client) *TaskRepository
func (*TaskRepository) FindById ¶
func (r *TaskRepository) FindById(id string) (*pkgmodels.Task, error)
func (*TaskRepository) Remove ¶
func (r *TaskRepository) Remove(id string) error
type UserRepository ¶
type UserRepository struct { DB *mongo.Client Collection *mongo.Collection }
func NewUserRepository ¶
func NewUserRepository(db *mongo.Client) *UserRepository
func (*UserRepository) FindByEmail ¶
func (r *UserRepository) FindByEmail(email string) (*pkgmodels.User, error)
func (*UserRepository) FindById ¶
func (r *UserRepository) FindById(id string) (*pkgmodels.User, error)
func (*UserRepository) Remove ¶
func (r *UserRepository) Remove(id string) error
Click to show internal directories.
Click to hide internal directories.