service

package
v0.0.0-...-8aeab2f Latest Latest
Warning

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

Go to latest
Published: Feb 19, 2023 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 AddTask

type AddTask struct {
	DB   *sqlx.DB
	Repo TaskAdder
}

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
}

func (*ListTask) ListTasks

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

type RegisterUser

type RegisterUser struct {
	DB   store.Execer
	Repo UserRegister
}

func (*RegisterUser) RegisterUser

func (r *RegisterUser) RegisterUser(
	ctx context.Context, name, password string, role entity.Role,
) (*entity.User, 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)
}

type UserRegister

type UserRegister interface {
	RegisterUser(ctx context.Context, db store.Execer, u *entity.User) error
}

Jump to

Keyboard shortcuts

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