2 Commits

2 changed files with 369 additions and 581 deletions

File diff suppressed because it is too large Load Diff

View File

@ -55,7 +55,14 @@ func NewApplication(ctx context.Context, cfg ApplicationConfig, mapper domain.Co
organizationrepo = sqliteConnection.Organization() organizationrepo = sqliteConnection.Organization()
repoCloser = sqliteConnection repoCloser = sqliteConnection
case RepositoryEngineYDB: case RepositoryEngineYDB:
return Application{}, errors.New("ydb is no longer supported") ydbConn, err := adapters.NewYDBConnection(ctx, cfg.YDB, log.With(slog.String("db", "ydb")))
if err != nil {
return Application{}, fmt.Errorf("making ydb connection: %w", err)
}
courseadapter = ydbConn.CourseRepository()
organizationrepo = ydbConn.Organization()
repoCloser = ydbConn
default: default:
return Application{}, errors.New("unable to decide which db engine to use") return Application{}, errors.New("unable to decide which db engine to use")
} }