forked from rucio/webui
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
sdk: add automatic feature loader rucio#171
- Loading branch information
Showing
5 changed files
with
161 additions
and
52 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/lib/infrastructure/ioc/features/logic-config-feature.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
import EnvConfigGatewayOutputPort from "@/lib/core/port/secondary/env-config-gateway-output-port" | ||
import LoginConfigUseCase from "@/lib/core/use-case/login-config-usecase" | ||
import { LoginConfigError, LoginConfigResponse } from "@/lib/core/usecase-models/login-config-usecase-models" | ||
import { BaseFeature, IOCSymbols } from "@/lib/sdk/ioc-helpers" | ||
import { Container } from "inversify" | ||
import LoginConfigController, { LoginConfigControllerParams } from "../../controller/login-config-controller" | ||
import { LoginViewModel } from "../../data/view-model/login" | ||
import EnvConfigGateway from "../../gateway/env-config-gateway" | ||
import LoginConfigPresenter from "../../presenter/login-config-presenter" | ||
import CONTROLLERS from "../ioc-symbols-controllers" | ||
import GATEWAYS from "../ioc-symbols-gateway" | ||
import INPUT_PORT from "../ioc-symbols-input-port" | ||
import USECASE_FACTORY from "../ioc-symbols-usecase-factory" | ||
|
||
export default class LoginConfigFeature extends BaseFeature< | ||
LoginConfigControllerParams, | ||
void, | ||
LoginConfigResponse, | ||
LoginConfigError, | ||
LoginViewModel | ||
> { | ||
constructor( | ||
appContainer: Container, | ||
|
||
) { | ||
const envGateway: EnvConfigGateway = appContainer.get<EnvConfigGatewayOutputPort>(GATEWAYS.ENV_CONFIG) | ||
const symbols: IOCSymbols = { | ||
CONTROLLER: CONTROLLERS.LOGIN_CONFIG, | ||
USECASE_FACTORY: USECASE_FACTORY.LOGIN_CONFIG, | ||
INPUT_PORT: INPUT_PORT.LOGIN_CONFIG, | ||
} | ||
super( | ||
appContainer, | ||
LoginConfigController, | ||
LoginConfigUseCase, | ||
[ | ||
envGateway, | ||
], | ||
LoginConfigPresenter, | ||
true, | ||
symbols | ||
) | ||
} | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters