service

package
v0.0.6 Latest Latest
Warning

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

Go to latest
Published: Aug 19, 2023 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type AddTask

type AddTask struct {
	DB   store.Execer
	Repo TaskAdder
}

store.Execer はDBを隠しているはずなので、DBという名前が美しくない

func (*AddTask) AddTask

func (a *AddTask) AddTask(ctx context.Context, title string) (*entity.Task, error)

type ListTask

type ListTask struct {
	DB   store.Queryer
	Repo TaskLister
}

Queryer はDBを隠しているはずなので、DB という名前が美しくない

func (*ListTask) ListTasks

func (l *ListTask) ListTasks(ctx context.Context) (entity.Tasks, error)

type TaskAdder

type TaskAdder interface {
	AddTask(ctx context.Context, db store.Execer, t *entity.Task) error
}

type TaskLister

type TaskLister interface {
	ListTasks(ctx context.Context, db store.Queryer) (entity.Tasks, error)
}

Jump to

Keyboard shortcuts

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