-
Notifications
You must be signed in to change notification settings - Fork 15
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
57 additions
and
0 deletions.
There are no files selected for viewing
55 changes: 55 additions & 0 deletions
55
src/lib/infrastructure/ioc/features/list-did-contents-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,55 @@ | ||
import DIDGatewayOutputPort from "@/lib/core/port/secondary/did-gateway-output-port" | ||
import { | ||
ListDIDContentsError, | ||
ListDIDContentsRequest, | ||
ListDIDContentsResponse, | ||
} from "@/lib/core/usecase-models/list-did-contents-usecase-models" | ||
import { ListDIDContentsControllerParameters } from "@/lib/infrastructure/controller/list-did-contents-controller" | ||
import ListDIDContentsController from "@/lib/infrastructure/controller/list-did-contents-controller" | ||
import { DIDViewModel } from "@/lib/infrastructure/data/view-model/did" | ||
import { | ||
BaseStreamableFeature, | ||
IOCSymbols, | ||
} from "@/lib/sdk/ioc-helpers" | ||
import GATEWAYS from "@/lib/infrastructure/ioc/ioc-symbols-gateway" | ||
import CONTROLLERS from "@/lib/infrastructure/ioc/ioc-symbols-controllers" | ||
import INPUT_PORT from "@/lib/infrastructure/ioc/ioc-symbols-input-port" | ||
import USECASE_FACTORY from "@/lib/infrastructure/ioc/ioc-symbols-usecase-factory" | ||
import { Container } from 'inversify' | ||
|
||
import ListDIDContentsUseCase from "@/lib/core/use-case/list-did-contents-usecase" | ||
|
||
import ListDIDContentsPresenter from "@/lib/infrastructure/presenter/list-did-contents-presenter" | ||
|
||
|
||
|
||
export default class ListDIDContentsFeature extends BaseStreamableFeature< | ||
ListDIDContentsControllerParameters, | ||
ListDIDContentsRequest, | ||
ListDIDContentsResponse, | ||
ListDIDContentsError, | ||
DIDViewModel | ||
> { | ||
constructor(appContainer: Container) { | ||
const didGateway = appContainer.get<DIDGatewayOutputPort>(GATEWAYS.DID) | ||
|
||
const symbols: IOCSymbols = { | ||
CONTROLLER: CONTROLLERS.LIST_DID_CONTENTS, | ||
USECASE_FACTORY: USECASE_FACTORY.LIST_DID_CONTENTS, | ||
INPUT_PORT: INPUT_PORT.LIST_DID_CONTENTS, | ||
} | ||
const useCaseConstructorArgs = [ | ||
didGateway, | ||
|
||
] | ||
super( | ||
'ListDIDContents', | ||
ListDIDContentsController, | ||
ListDIDContentsUseCase, | ||
useCaseConstructorArgs, | ||
ListDIDContentsPresenter, | ||
false, | ||
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