repository

package
v0.0.0-...-9427ade Latest Latest
Warning

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

Go to latest
Published: Jun 12, 2022 License: GPL-3.0 Imports: 8 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 interface {
	Insert(todo models.Todo) (bool, error)
	GetAll() ([]models.Todo, error)
	Delete(id primitive.ObjectID) (bool, error)
}

type TodoRepositoryDB

type TodoRepositoryDB struct {
	TodoCollection *mongo.Collection
}

func NewTodoRepositoryDB

func NewTodoRepositoryDB(dbClient *mongo.Collection) *TodoRepositoryDB

func (TodoRepositoryDB) Delete

func (t TodoRepositoryDB) Delete(id primitive.ObjectID) (bool, error)

func (TodoRepositoryDB) GetAll

func (t TodoRepositoryDB) GetAll() ([]models.Todo, error)

func (*TodoRepositoryDB) Insert

func (t *TodoRepositoryDB) Insert(todo models.Todo) (bool, error)

Jump to

Keyboard shortcuts

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