mirror of
https://github.com/dadosfera/maestro.git
synced 2026-11-19 06:29:09 +00:00
REFACTOR: Project Pattern and AuthClient (DUC)
This commit is contained in:
@@ -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,
|
||||
// },
|
||||
// },
|
||||
// };
|
||||
@@ -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);
|
||||
// }
|
||||
// }
|
||||
Reference in New Issue
Block a user