todo

package
v0.0.0-...-0d6a196 Latest Latest
Warning

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

Go to latest
Published: Sep 22, 2022 License: GPL-3.0 Imports: 4 Imported by: 0

Documentation

Overview

Package todo is a generated GoMock package.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MocktodoRepository

type MocktodoRepository struct {
	// contains filtered or unexported fields
}

MocktodoRepository is a mock of todoRepository interface.

func NewMocktodoRepository

func NewMocktodoRepository(ctrl *gomock.Controller) *MocktodoRepository

NewMocktodoRepository creates a new mock instance.

func (*MocktodoRepository) Add

func (m *MocktodoRepository) Add(ctx context.Context, item todo.Todo) error

Add mocks base method.

func (*MocktodoRepository) EXPECT

EXPECT returns an object that allows the caller to indicate expected use.

func (*MocktodoRepository) Get

func (m *MocktodoRepository) Get(ctx context.Context) ([]todo.Todo, error)

Get mocks base method.

func (*MocktodoRepository) Update

func (m *MocktodoRepository) Update(ctx context.Context, id uint64, item todo.Todo) error

Update mocks base method.

type MocktodoRepositoryMockRecorder

type MocktodoRepositoryMockRecorder struct {
	// contains filtered or unexported fields
}

MocktodoRepositoryMockRecorder is the mock recorder for MocktodoRepository.

func (*MocktodoRepositoryMockRecorder) Add

func (mr *MocktodoRepositoryMockRecorder) Add(ctx, item interface{}) *gomock.Call

Add indicates an expected call of Add.

func (*MocktodoRepositoryMockRecorder) Get

func (mr *MocktodoRepositoryMockRecorder) Get(ctx interface{}) *gomock.Call

Get indicates an expected call of Get.

func (*MocktodoRepositoryMockRecorder) Update

func (mr *MocktodoRepositoryMockRecorder) Update(ctx, id, item interface{}) *gomock.Call

Update indicates an expected call of Update.

type UseCase

type UseCase struct {
	// contains filtered or unexported fields
}

UseCase define main todo struct

func New

func New(repo todoRepository) *UseCase

New usecase instance

func (*UseCase) Add

func (u *UseCase) Add(ctx context.Context, payload todo.TodoCreatePayload) error

Add given parameter into current todo list TODO: implement this. Remember to add the timestamp

func (*UseCase) List

func (u *UseCase) List(ctx context.Context, filter todo.TodoFilter) ([]todo.Todo, error)

List saved todo list with given filter

func (*UseCase) MarkAsDone

func (u *UseCase) MarkAsDone(ctx context.Context, taskID uint64) error

MarkAsDone for given taskID TODO: implement this. Remember to add the updated timestamp

Jump to

Keyboard shortcuts

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