19 lines
487 B
Go
19 lines
487 B
Go
package problems
|
|
|
|
import (
|
|
"context"
|
|
"git.sch9.ru/new_gate/ms-tester/internal/models"
|
|
)
|
|
|
|
type ProblemPolicyAgent interface {
|
|
CanCreateProblem(ctx context.Context) error
|
|
CanReadProblem(ctx context.Context) error
|
|
CanDeleteProblem(ctx context.Context) error
|
|
}
|
|
|
|
type ProblemUseCase interface {
|
|
CreateProblem(ctx context.Context, title string) (int32, error)
|
|
ReadProblemById(ctx context.Context, id int32) (*models.Problem, error)
|
|
DeleteProblem(ctx context.Context, id int32) error
|
|
}
|