{"id":20548008,"url":"https://github.com/aleroxac/goexpert-weather-api","last_synced_at":"2026-06-10T09:31:47.851Z","repository":{"id":240568905,"uuid":"768056788","full_name":"aleroxac/goexpert-weather-api","owner":"aleroxac","description":"Projeto do Laboratório \"Deploy com Cloud Run\" do treinamento GoExpert(FullCycle).","archived":false,"fork":false,"pushed_at":"2024-05-21T00:03:33.000Z","size":25,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-05-21T22:19:12.007Z","etag":null,"topics":["api","fullcycle","go","goexpert","golang","weather"],"latest_commit_sha":null,"homepage":"https://github.com/aleroxac/goexpert-weather-api","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/aleroxac.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-03-06T11:45:21.000Z","updated_at":"2024-05-27T21:31:43.227Z","dependencies_parsed_at":"2024-05-27T21:31:39.148Z","dependency_job_id":"f61818c7-0fc1-4387-a4c9-e671c0f8dd81","html_url":"https://github.com/aleroxac/goexpert-weather-api","commit_stats":null,"previous_names":["aleroxac/goexpert-weather-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/aleroxac/goexpert-weather-api","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleroxac%2Fgoexpert-weather-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleroxac%2Fgoexpert-weather-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleroxac%2Fgoexpert-weather-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleroxac%2Fgoexpert-weather-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/aleroxac","download_url":"https://codeload.github.com/aleroxac/goexpert-weather-api/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/aleroxac%2Fgoexpert-weather-api/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34146871,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-10T02:00:07.152Z","response_time":89,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["api","fullcycle","go","goexpert","golang","weather"],"created_at":"2024-11-16T02:11:38.899Z","updated_at":"2026-06-10T09:31:47.702Z","avatar_url":"https://github.com/aleroxac.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# goexpert-weather-api\nProjeto do Laboratório \"Deploy com Cloud Run\" do treinamento GoExpert(FullCycle).\n\n\n\n## O desafio\nDesenvolver um sistema em Go que receba um CEP, identifica a cidade e retorna o clima atual (temperatura em graus celsius, fahrenheit e kelvin). Esse sistema deverá ser publicado no Google Cloud Run.\n\n\n\n## Como rodar o projeto: make\n``` shell\n# build the container image\nmake build\n\n# push the container image and deploy to GCP Cloud Run\nmake deploy\n\n# run locally\nmake run\n```\n\n\n\n## Como rodar o projeto: manual\n``` shell\n## 1. Clone o repo\n\n## 2. Crie o .env\ncp .env.example .env\n\n## 3. Coloque sua api-key como valor na variável OPEN_WEATHERMAP_API_KEY no .env\n\n## 4. Baixe compose, se estiver up\ndocker-compose down\n\n## 5. Remover a imagem antiga, se existir\ndocker image rm -f gcr.io/aleroxac/goexpert-weather-api:v1\n\n## 6. Suba o compose \ndocker-compose up -d\n\n## 7. Faça as chamadas\n## retorno 200\necho -n \"422: \"; curl -s \"http://localhost:8080/cep/1234567\"\necho -n \"404: \"; curl -s \"http://localhost:8080/cep/12345678\"\necho -n \"200: \"; curl -s \"http://localhost:8080/cep/13330250\"\n```\n\n\n\n## Funcionalidades da Linguagem Utilizadas\n- context\n- net/http\n- encoding/json\n- testing\n- testify\n\n\n\n## Requisitos: sistema\n- [x] O sistema deve receber um CEP válido de 8 digitos\n- [x] O sistema deve realizar a pesquisa do CEP e encontrar o nome da localização, a partir disso, deverá retornar as temperaturas e formata-lás em: Celsius, Fahrenheit, Kelvin.\n- [x] O sistema deve responder adequadamente nos seguintes cenários:\n    - Em caso de sucesso:\n        - [x] Código HTTP: 200\n        - [x] Response Body: { \"temp_C\": 28.5, \"temp_F\": 28.5, \"temp_K\": 28.5 }\n    - Em caso de falha, caso o CEP não seja válido (com formato correto):\n        - [x] Código HTTP: 422\n        - [x] Mensagem: invalid zipcode\n    - ​​​Em caso de falha, caso o CEP não seja encontrado:\n        - [x] Código HTTP: 404\n        - [x] Mensagem: can not find zipcode\n- [x] Deverá ser realizado o [deploy no Google Cloud Run](https://goexpert-weather-api-llvisyuaqq-uc.a.run.app).\n\n\n\n## Requisitos: entrega\n- [x] O código-fonte completo da implementação.\n- [x] Testes automatizados demonstrando o funcionamento.\n- [x] Utilize docker e docker-compose para que possamos realizar os testes de sua aplicação.\n- [x] Deploy realizado no Google Cloud Run (free tier) e [endereço ativo para ser acessado](https://goexpert-weather-api-llvisyuaqq-uc.a.run.app).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleroxac%2Fgoexpert-weather-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faleroxac%2Fgoexpert-weather-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faleroxac%2Fgoexpert-weather-api/lists"}