Documentation ¶
Index ¶
- type TodoRepository
- func (repo TodoRepository) Create(t entity.CreateTodoParam) (*entity.Todo, error)
- func (repo TodoRepository) DeleteById(ID primitive.ObjectID) (bool, error)
- func (repo TodoRepository) GetTodoByID(ID primitive.ObjectID) (*entity.Todo, error)
- func (repo TodoRepository) GetTodosByUserID(ID primitive.ObjectID) ([]*entity.Todo, error)
- func (repo TodoRepository) UpdateById(ID primitive.ObjectID, t entity.UpdateTodoParam) (bool, error)
- type UserRepository
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type TodoRepository ¶
func NewTodoRepository ¶
func NewTodoRepository(DB *mongo.Database) *TodoRepository
func (TodoRepository) Create ¶
func (repo TodoRepository) Create(t entity.CreateTodoParam) (*entity.Todo, error)
func (TodoRepository) DeleteById ¶
func (repo TodoRepository) DeleteById(ID primitive.ObjectID) (bool, error)
func (TodoRepository) GetTodoByID ¶ added in v1.0.0
func (TodoRepository) GetTodosByUserID ¶
func (TodoRepository) UpdateById ¶
func (repo TodoRepository) UpdateById(ID primitive.ObjectID, t entity.UpdateTodoParam) (bool, error)
type UserRepository ¶
func NewUserRepository ¶
func NewUserRepository(DB *mongo.Database) *UserRepository
func (UserRepository) Create ¶
func (repo UserRepository) Create(t entity.CreateUserParam) (*entity.User, error)
func (UserRepository) GetUserByEmail ¶
func (repo UserRepository) GetUserByEmail(email string) (*entity.User, error)
Click to show internal directories.
Click to hide internal directories.