infrastructure

package
v1.11.2 Latest Latest
Warning

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

Go to latest
Published: Mar 4, 2024 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrNoTodoGiven  = errors.New("no todo given")
	ErrTodoNotFound = errors.New("todo not found")
)

Functions

This section is empty.

Types

type TodoService

type TodoService struct{}

TodoService service definition

func (*TodoService) AddTodo

func (ts *TodoService) AddTodo(_ context.Context, _ string, task string) (*domain.Todo, error)

AddTodo mutation adds an entry to the list

func (*TodoService) TodoDone

func (ts *TodoService) TodoDone(_ context.Context, todoID string, done bool) (*domain.Todo, error)

TodoDone marks a task as finished

func (*TodoService) Todos

func (ts *TodoService) Todos(_ context.Context, _ string) ([]*domain.Todo, error)

Todos returns a list of mocked todos

Jump to

Keyboard shortcuts

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