repository

package
v0.0.1-alpha-rc2 Latest Latest
Warning

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

Go to latest
Published: Nov 25, 2021 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type TodoRepo

type TodoRepo interface {
	Save(ctx context.Context, doc *models.Todo) error
	FindOne(ctx context.Context, doc models.Todo) (models.Todo, error)
	Update(ctx context.Context, doc *models.Todo, fieldsToUpdate []string) error
	FindAll(ctx context.Context, query models.TodoQuery) ([]models.Todo, int64, error)
}

TodoRepo is interface for todo repository

func NewTodoRepo

func NewTodoRepo(db orm.Ormer) TodoRepo

NewTodoRepo initializes todoRepo

type TodoRepoMock

type TodoRepoMock struct {
	mock.Mock
}

func NewTodoRepoMock

func NewTodoRepoMock() *TodoRepoMock

func (*TodoRepoMock) FindAll

func (repo *TodoRepoMock) FindAll(ctx context.Context, query models.TodoQuery) ([]models.Todo, int64, error)

func (*TodoRepoMock) FindOne

func (repo *TodoRepoMock) FindOne(ctx context.Context, doc models.Todo) (models.Todo, error)

func (*TodoRepoMock) Save

func (repo *TodoRepoMock) Save(ctx context.Context, doc *models.Todo) error

func (*TodoRepoMock) Update

func (repo *TodoRepoMock) Update(ctx context.Context, doc *models.Todo, fieldsToUpdate []string) error

Jump to

Keyboard shortcuts

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