repository

package
v0.0.0-...-e35e65d Latest Latest
Warning

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

Go to latest
Published: Jul 29, 2019 License: Apache-2.0 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 {
	// contains filtered or unexported fields
}

TodoRepository is the repository for Todo

func NewTodoRepository

func NewTodoRepository(db *mongo.Database) *TodoRepository

NewTodoRepository creates new NewsRepository instance.

func (*TodoRepository) Get

func (r *TodoRepository) Get() ([]model.Todo, error)

func (*TodoRepository) Save

func (r *TodoRepository) Save(data *model.Todo) (string, error)

Save stores new Todo to db

type TodoRepositoryContract

type TodoRepositoryContract interface {
	Save(data *model.Todo) (string, error)
	Get() ([]model.Todo, error)
}

TodoRepositoryContract represents interface for TodoRepository

Jump to

Keyboard shortcuts

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