18 lines
556 B
Go
18 lines
556 B
Go
package problems
|
|
|
|
import (
|
|
"context"
|
|
"git.sch9.ru/new_gate/models"
|
|
)
|
|
|
|
type ProblemUseCase interface {
|
|
CanCreateProblem(ctx context.Context) error
|
|
CanReadProblemById(ctx context.Context) error
|
|
CanUpdateProblem(ctx context.Context) error
|
|
CanDeleteProblem(ctx context.Context) error
|
|
CreateProblem(ctx context.Context, problem *models.Problem) (int32, error)
|
|
ReadProblemById(ctx context.Context, id int32) (*models.Problem, error)
|
|
UpdateProblem(ctx context.Context, problem *models.Problem) error
|
|
DeleteProblem(ctx context.Context, id int32) error
|
|
}
|