todo

package
v0.0.0-...-359b0be Latest Latest
Warning

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

Go to latest
Published: Mar 9, 2023 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrTaskNotFound      = errors.New("task not found")
	ErrTaskAlreadyExists = errors.New("task already exists")
)

Functions

This section is empty.

Types

type Task

type Task struct {
	ID   int64
	Name string
	Done bool
}

Task represents a task that may need to be performed. It is purely a domain entity with no context of usecases or applications.

type TaskRepository

type TaskRepository interface {
	Insert(context.Context, *Task) error
	FindAll(context.Context) ([]Task, error)
	FindByID(ctx context.Context, id int64) (*Task, error)
	Update(context.Context, *Task) error
	DeleteByID(ctx context.Context, id int64) error
}

TaskRepository is the interface used to persist the Task(s).

Jump to

Keyboard shortcuts

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