Documentation
¶
Index ¶
- type Service
- type TodoService
- func (st *TodoService) AddTask(ctx context.Context, title string) (*model.Task, error)
- func (st *TodoService) AddUser(ctx context.Context, name string, password string, role string) (model.UserID, error)
- func (st *TodoService) GetTaskList(ctx context.Context) (model.TaskList, error)
- func (st *TodoService) GetUser(ctx context.Context, name string) (*model.User, error)
- func (st *TodoService) HealthCheck(ctx context.Context) error
- func (st *TodoService) Login(ctx context.Context, name string, password string) (string, error)
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) GetTaskList ¶ added in v0.0.14
func (*TodoService) HealthCheck ¶ added in v0.0.14
func (st *TodoService) HealthCheck(ctx context.Context) error
Click to show internal directories.
Click to hide internal directories.