generated from VLADIMIR/template
fix
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user