This commit is contained in:
2026-10-01 15:29:07 +07:00
parent f9e44f3ae4
commit 03adeb287a
2 changed files with 5 additions and 5 deletions
@@ -14,9 +14,9 @@ import (
"strings"
)
// scenariosRepository — граница доступа к данным сценариев, реализуемая
// IScenariosRepository — граница доступа к данным сценариев, реализуемая
// *scenarios_repo.ScenariosRepo (интерфейс — для тестов без БД).
type scenariosRepository interface {
type IScenariosRepository interface {
AddScenario(ctx context.Context, name string, authorID int) (int, error)
GetScenariosByAuthorID(ctx context.Context, authorID int) ([]*repos.Scenario, error)
GetScenariosByStatus(ctx context.Context, status string) ([]*repos.Scenario, error)
@@ -29,7 +29,7 @@ type scenariosRepository interface {
}
type ScenarioService struct {
scenariosRepo scenariosRepository
scenariosRepo IScenariosRepository
cleaner cleaner.ICleaner
fileStorage file_storage.IFileStorage
scenarioArchive scenario_archive.IScenarioArchive
@@ -37,7 +37,7 @@ type ScenarioService struct {
}
func NewScenarioService(
scenariosRepo scenariosRepository,
scenariosRepo IScenariosRepository,
cleaner cleaner.ICleaner,
domain string,
fileStorage file_storage.IFileStorage,
@@ -148,7 +148,7 @@ func (s *fakeStorage) names() []string {
return res
}
// fakeScenariosRepo — минимальная in-memory реализация scenariosRepository.
// fakeScenariosRepo — минимальная in-memory реализация IScenariosRepository.
type fakeScenariosRepo struct {
mu sync.Mutex
byID map[int]*repos.Scenario