{"id":31842559,"url":"https://github.com/hqr999/golang-chi-api","last_synced_at":"2026-07-30T08:31:26.627Z","repository":{"id":317104895,"uuid":"1061909897","full_name":"hqr999/Golang-Chi-API","owner":"hqr999","description":"An API in Go using the chi library","archived":false,"fork":false,"pushed_at":"2026-01-19T19:28:38.000Z","size":26,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2026-01-20T01:16:56.255Z","etag":null,"topics":["go-chi","golang","rest-api"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/hqr999.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-09-22T14:47:49.000Z","updated_at":"2026-01-19T19:28:42.000Z","dependencies_parsed_at":"2025-09-29T23:01:32.938Z","dependency_job_id":null,"html_url":"https://github.com/hqr999/Golang-Chi-API","commit_stats":null,"previous_names":["hqr999/golang-chi-api"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/hqr999/Golang-Chi-API","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hqr999%2FGolang-Chi-API","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hqr999%2FGolang-Chi-API/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hqr999%2FGolang-Chi-API/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hqr999%2FGolang-Chi-API/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hqr999","download_url":"https://codeload.github.com/hqr999/Golang-Chi-API/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hqr999%2FGolang-Chi-API/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":36069095,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-07-20T02:08:10.276Z","status":"online","status_checked_at":"2026-07-30T02:00:05.956Z","response_time":106,"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":["go-chi","golang","rest-api"],"created_at":"2025-10-12T06:27:56.361Z","updated_at":"2026-07-30T08:31:26.620Z","avatar_url":"https://github.com/hqr999.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API Livros com Go\n\nEsse projeto é uma implementação de uma API que devolve livros. Esse projeto foi feito usando a ótima biblioteca HTTP chi em Golang.\n\nO programa faz as 4 operações básicas de uma API Rest, também chamado de **CRUD**. Nossa API portanto é capaz de:\n    \n* CREATE=Cria uma nova instância do livro.\n* READ=Lê as saídas dos nossos livros que foram cadastrados.\n* UPDATE=Atualiza algum livro se passarmos uma id válida\n* Delete=Deleta algum livro se passarmos uma id válida\n\nNossa aplicação começa já lendo um arquivo .json já com alguns livros.Vocês os verá quando fizer o seu comando **GET**.\n\n# Como Rodar \nAbra dois terminais, um para abrir e deixar rodando o servidor e o outro para.\n\n## No primeiro terminal rode:\n\n    \u003e go run main.go\n\nCada fez que você fizer um comando http, ele aparecerá enquanto o servidor estiver rodando.\n\n## No segundo terminal rode:\n\nCada um dos comandos usa o comando curl e faz um dos comandos http, você também pode usar o POSTMAN ou outra plataforma de API.Você pode rodar os seguintes comandos com o curl:\n\n* **GET** \n        \n        \u003e curl -s localhost:3000/livros | jq .  \n* **POST**\n\n        \u003e curl -X POST \\        \n        -H \"Content-Type: application/json\" \\\n        -d '{\"id\": \"10\",\"title\": \"Irmãos Karamázov\",\"autor\": \"Fiodor Dostoievski\",\"data_publicacao\": \"1883\", \"lingua_original\": \"Russo\"}' \\\n        localhost:3000/livros\n\n* **DELETE**\n\n        \u003e curl -X DELETE localhost:3000/livros/{id}\n\n* **PUT** \n\n        \u003e curl -X POST \\        \n        -H \"Content-Type: application/json\" \\\n        -d '{\"id\": \"número\",\"title\": \"título\",\"autor\": \"autor\",\"data_publicacao\": \"ano\", \"lingua_original\": \"língua\"}' \\\n        localhost:3000/livros/{id}\n\n\n# Referências \nhttps://go-chi.io/#/\n\nhttps://ics.uci.edu/~fielding/pubs/dissertation/rest_arch_style.htm\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhqr999%2Fgolang-chi-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhqr999%2Fgolang-chi-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhqr999%2Fgolang-chi-api/lists"}