{"id":20849619,"url":"https://github.com/augustoscher/go-api-c","last_synced_at":"2026-05-22T04:08:03.374Z","repository":{"id":100241293,"uuid":"187036734","full_name":"augustoscher/go-api-c","owner":"augustoscher","description":"GOlang API with JWT authentication example","archived":false,"fork":false,"pushed_at":"2019-05-16T14:09:40.000Z","size":19,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-12-30T11:39:27.196Z","etag":null,"topics":["api-rest","go","golang","jwt"],"latest_commit_sha":null,"homepage":"","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/augustoscher.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":"2019-05-16T13:46:49.000Z","updated_at":"2019-10-22T12:43:24.000Z","dependencies_parsed_at":"2023-06-03T22:30:48.193Z","dependency_job_id":null,"html_url":"https://github.com/augustoscher/go-api-c","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/augustoscher/go-api-c","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustoscher%2Fgo-api-c","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustoscher%2Fgo-api-c/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustoscher%2Fgo-api-c/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustoscher%2Fgo-api-c/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/augustoscher","download_url":"https://codeload.github.com/augustoscher/go-api-c/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/augustoscher%2Fgo-api-c/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33328681,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-21T12:23:38.849Z","status":"online","status_checked_at":"2026-05-22T02:00:06.671Z","response_time":265,"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-rest","go","golang","jwt"],"created_at":"2024-11-18T03:05:55.727Z","updated_at":"2026-05-22T04:08:03.325Z","avatar_url":"https://github.com/augustoscher.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-api-c #\n\n#### GOlang API with JWT authentication example ####\n\n* GOlang-API-C  \n\n##### Requirements:  \n- Go needs to be installed.\n- Some tool to endpoint testing (curl, postman)\n\n\n### Setting Up \n----\n##### 1. Clone the repositorie in your GOPATH  \n\u003e git clone https://augustoscher@bitbucket.org/augustoscher/api-c.git   \n\n##### 2. Access the repositorie\n\u003e cd go-api-c  \n\n##### 3. Install the dependencies\n\u003e go get  \n\nor one by one  \n\n\u003e got get github.com/codegangsta/negroni  \n\u003e got get github.com/dgrijalva/jwt-go  \n\u003e got get github.com/gorilla/context  \n\u003e got get github.com/gorilla/mux  \n\u003e got get github.com/mitchellh/mapstructure  \n\n##### 4. Running\n\u003e go run main.go  \n\n\n### Test\n----\n\n##### 1. Login   \n\u003e POST http://localhost:3000/login  \n```json\n{\n  \"username\": \"augusto\",\n  \"password\": \"testing\"\n}\n```\n\nIt should return: \n```json\n{\"token\":\"eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJwYXNzd29yZCI6InRlc3RpbmciLCJ1c2VybmFtZSI6ImF1Z3VzdG8ifQ.77xiMA_tBkEhwigv9n5iAk_i59Y63eRLWuk3AehARO8\"}\n```\nYou have to add Bearer Token in header of every request.\n\n##### 2. Get the history of searchs by CPF     \n\u003e GET http://localhost:3000/consultascpf/02206795012  \nor  \n\u003e http://localhost:3000/consultascpf  \n\n##### 3. Get the history of financial transactions by CPF  \n\u003e GET http://localhost:3000/movimentosfinanceiro/02506196013  \nor  \n\u003e GET http://localhost:3000/movimentosfinanceiro \n\n\n##### 4. Get the history of credit card transactions by CPF  \n\u003e GET http://localhost:3000/movimentoscartao/02506196013  \nor  \n\u003e A url http://localhost:3000/movimentoscartao\n\n### Next steps\n----\nDockerize the API and HTTP Rest Client with docker-compose\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugustoscher%2Fgo-api-c","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Faugustoscher%2Fgo-api-c","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Faugustoscher%2Fgo-api-c/lists"}