service

package
v0.0.17 Latest Latest
Warning

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

Go to latest
Published: Sep 14, 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 Service added in v0.0.13

type Service interface {
	HealthCheck(ctx context.Context) error
	GetTaskList(ctx context.Context) (model.TaskList, error)
	AddTask(ctx context.Context, title string) (*model.Task, error)
	AddUser(ctx context.Context, name string, password string, role string) (model.UserID, error)
	GetUser(ctx context.Context, name string) (*model.User, error)
	Login(ctx context.Context, name string, password string) (string, error)
}

type TodoService added in v0.0.14

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

これより上位のUI層で詳細なエラー情報を返すことはない そのため、この層でのロギングが必要である

func NewTodoService added in v0.0.14

func NewTodoService(ctx context.Context, db repository.Database, logger log.Logger) *TodoService

func (*TodoService) AddTask added in v0.0.14

func (st *TodoService) AddTask(ctx context.Context, title string) (*model.Task, error)

func (*TodoService) AddUser added in v0.0.16

func (st *TodoService) AddUser(ctx context.Context, name string, password string, role string) (model.UserID, error)

func (*TodoService) GetTaskList added in v0.0.14

func (st *TodoService) GetTaskList(ctx context.Context) (model.TaskList, error)

func (*TodoService) GetUser added in v0.0.17

func (st *TodoService) GetUser(ctx context.Context, name string) (*model.User, error)

func (*TodoService) HealthCheck added in v0.0.14

func (st *TodoService) HealthCheck(ctx context.Context) error

func (*TodoService) Login added in v0.0.17

func (st *TodoService) Login(ctx context.Context, name string, password string) (string, error)

Jump to

Keyboard shortcuts

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