ms-tester/internal/problems/usecase.go

19 lines
487 B
Go
Raw Normal View History

2024-10-09 18:55:16 +00:00
package problems
import (
"context"
2024-10-13 14:01:36 +00:00
"git.sch9.ru/new_gate/ms-tester/internal/models"
2024-10-09 18:55:16 +00:00
)
2024-10-13 14:01:36 +00:00
type ProblemPolicyAgent interface {
2024-10-09 18:55:16 +00:00
CanCreateProblem(ctx context.Context) error
2024-10-13 14:01:36 +00:00
CanReadProblem(ctx context.Context) error
2024-10-09 18:55:16 +00:00
CanDeleteProblem(ctx context.Context) error
2024-10-13 14:01:36 +00:00
}
type ProblemUseCase interface {
CreateProblem(ctx context.Context, title string) (int32, error)
2024-10-09 18:55:16 +00:00
ReadProblemById(ctx context.Context, id int32) (*models.Problem, error)
DeleteProblem(ctx context.Context, id int32) error
}