REFACTOR: Project Pattern and AuthClient (DUC)

This commit is contained in:
Victor Radael
2022-03-14 10:35:03 -03:00
parent 2f8d9b9550
commit 363bc8b350
163 changed files with 2544 additions and 4138 deletions
+17
View File
@@ -0,0 +1,17 @@
// import { join } from 'path';
// import { ClientOptions, Transport } from '@nestjs/microservices';
// export const InputsClientConfiguration: ClientOptions = {
// transport: Transport.GRPC,
// options: {
// //url: `${process.env.USERS_SVC_URL}:${process.env.USERS_SVC_PORT}`,
// url: `127.0.0.1:50052`,
// package: 'input',
// protoPath: join(__dirname, '..', 'proto', 'input.proto'),
// loader: {
// enums: String,
// objects: true,
// arrays: true,
// },
// },
// };
+64
View File
@@ -0,0 +1,64 @@
// import {
// Get,
// Post,
// Controller,
// Delete,
// OnModuleInit,
// Put,
// Param,
// } from '@nestjs/common';
// import { Client, ClientGrpc, Payload } from '@nestjs/microservices';
// import { CreateInputGrpcClientDto } from './dto/create-input-grpc-client.dto';
// import { UpdateInputGrpcClientDto } from './dto/update-input-grpc-client.dto';
// import { InputGrpcClientService } from './input-grpc-client.service';
// import { GrpcClientConfiguration } from './client.config';
// import { TestConnectionDTO } from './dto/test-connection-grpc-client.dto';
// import { ApiTags } from '@nestjs/swagger';
// @Controller('grpc/input')
// export class InputsClientService implements OnModuleInit {
// @Client(GrpcClientConfiguration)
// private inputServiceClient: ClientGrpc;
// private inputService: InputGrpcClientService;
// onModuleInit() {
// this.inputService =
// this.inputServiceClient.getService<InputGrpcClientService>(
// 'InputService',
// );
// }
// @Post()
// async create(@Payload() createInputDto: CreateInputGrpcClientDto) {
// return this.inputService.create(createInputDto);
// }
// @Get()
// list() {
// return this.inputService.list();
// }
// @Get(':id')
// show(@Param() id: string) {
// return this.inputService.show(id);
// }
// @Put(':id')
// update(
// @Payload() updateInputDto: UpdateInputGrpcClientDto,
// @Param() id: string,
// ) {
// return this.inputService.update(id, updateInputDto);
// }
// @Delete(':id')
// remove(@Param() id: string) {
// return this.inputService.remove(id);
// }
// @Get('/test-connection')
// testConnection(@Payload() testConnectionDTO: TestConnectionDTO) {
// return this.inputService.testConnection(testConnectionDTO);
// }
// }