mongo

package
v1.0.1 Latest Latest
Warning

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

Go to latest
Published: Jul 17, 2021 License: MIT Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TodoRepository

type TodoRepository struct {
	DB *mongo.Database
}

func NewTodoRepository

func NewTodoRepository(DB *mongo.Database) *TodoRepository

func (TodoRepository) Create

func (TodoRepository) DeleteById

func (repo TodoRepository) DeleteById(ID primitive.ObjectID) (bool, error)

func (TodoRepository) GetTodoByID added in v1.0.0

func (repo TodoRepository) GetTodoByID(ID primitive.ObjectID) (*entity.Todo, error)

func (TodoRepository) GetTodosByUserID

func (repo TodoRepository) GetTodosByUserID(ID primitive.ObjectID) ([]*entity.Todo, error)

func (TodoRepository) UpdateById

func (repo TodoRepository) UpdateById(ID primitive.ObjectID, t entity.UpdateTodoParam) (bool, error)

type UserRepository

type UserRepository struct {
	DB *mongo.Database
}

func NewUserRepository

func NewUserRepository(DB *mongo.Database) *UserRepository

func (UserRepository) Create

func (UserRepository) GetUserByEmail

func (repo UserRepository) GetUserByEmail(email string) (*entity.User, error)

Jump to

Keyboard shortcuts

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