Giter Club home page Giter Club logo

goexpert-cleanarch's Introduction

goexpert-cleanarch

O desafio

Criar uma API onde seja possível criar(já está pronto) e listar(este é o desafio) ordens de serviços, informando um preço e uma taxa, e então retornar o preço final.

Como rodar o projeto

  1. Instale as dependências e suba os containers
make install
make up
  1. Teste a aplicação: REST API server
  • faça uma chamada POST para criar uma nova order via rest-client usando o arquivo api.http
  • faça uma chamada GET para listar as orders via rest-client usando o arquivo api.http
  1. Teste a aplicação: gRPC server
## crie uma nova order
evans --proto internal/infra/grpc/protofiles/order.proto --host localhost --port 50051
=> call CreateOrder
=> 2
=> 10.5
=> 0.5

## liste as orders
evans --proto internal/infra/grpc/protofiles/order.proto --host localhost --port 50051
=> call ListOrders
  1. Teste a aplicação: GraphQL server
## crie uma nova order
mutation createOrder {
  createOrder(input: {id:"3", Price: 10.5, Tax: 0.5}) {
    id
    Price
    Tax
  }
}

## liste as orders
query queryOrders {
  listOrders {
    id
    Price
    Tax
    FinalPrice
  }
}
  1. Baixe os containers
make down

Funcionalidades da Linguagem Utilizadas

  • di: wire
  • configs: viper
  • tests: testify
  • messaging: amqp(rabbitmq)
  • apis: net/http, grpc, graphql
  • database/sql: mysql, sqlite3(unit-tests)

Requisitos

  • Esta API deve conter um servidor REST, GraphQL e gRPC.
    • Endpoint REST (GET /order)
    • Service ListOrders com GRPC
    • Query ListOrders GraphQL
  • Criar requests para criar e listar orders no arquivo api.http
  • Criar as migrações necessárias
  • Usar docker e docker-compose para rodar tudo via containers
  • Documentar informações relevantes sobre o projeto e como executá-lo

goexpert-cleanarch's People

Contributors

aleroxac avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.