{"id":19373755,"url":"https://github.com/waelson/go-ratelimiter","last_synced_at":"2026-06-08T21:33:02.266Z","repository":{"id":226817989,"uuid":"766188227","full_name":"Waelson/go-ratelimiter","owner":"Waelson","description":null,"archived":false,"fork":false,"pushed_at":"2024-03-15T18:41:57.000Z","size":14,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-02-24T15:22:05.517Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/Waelson.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-02T15:23:59.000Z","updated_at":"2024-03-09T21:28:24.000Z","dependencies_parsed_at":"2024-03-15T19:47:52.434Z","dependency_job_id":"20753e1c-7697-4813-b7ab-fcde852b479d","html_url":"https://github.com/Waelson/go-ratelimiter","commit_stats":null,"previous_names":["waelson/go-ratelimiter"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Waelson/go-ratelimiter","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waelson%2Fgo-ratelimiter","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waelson%2Fgo-ratelimiter/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waelson%2Fgo-ratelimiter/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waelson%2Fgo-ratelimiter/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Waelson","download_url":"https://codeload.github.com/Waelson/go-ratelimiter/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Waelson%2Fgo-ratelimiter/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":34082130,"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-08T02:00:07.615Z","response_time":111,"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":[],"created_at":"2024-11-10T08:31:30.327Z","updated_at":"2026-06-08T21:33:02.250Z","avatar_url":"https://github.com/Waelson.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"### Sobre o projeto\nSimples implementação de um Rate Limit por meio de um middleware\n\n### Pré Requisitos\n- Go 1.22.1\n- Redis\n- Docker\n\n### Parametrização\nTodos as configurações podem ser feitas no arquivo '.env'\n```\nREDIS_ADDRESS=localhost:6379\nIP_RATE_LIMIT=5\nTOKEN_RATE_LIMIT=100\nIP_BLOCK_DURATION=5\nTOKEN_BLOCK_DURATION=1\n```\nDetalhes do arquivo de configuração\n- REDIS_ADDRESS: Endereço do servidor Redis\n- IP_RATE_LIMIT: Quantidade de requisições permitidas por segundos SEM o uso de token.\n- TOKEN_RATE_LIMIT: Quantidade de requisições permitidas por segundos COM o uso de token.\n- IP_BLOCK_DURATION=Tempo de bloqueio em segundos após ultrapassar a quantidade máxima de requisições por segundo SEM utilizar o token\n- TOKEN_BLOCK_DURATION: Tempo de bloqueio em segundos após ultrapassar a quantidade máxima de requisições por segundo utilizando o token\n\n### Como executar?\n\n```\ndocker-compose up --build\n```\n\n### Fazendo Request\nUsando o endereço IP no browser\n```\nhttp://localhost:8080\n```\nUsando o endereço IP com cURL\n```\ncurl --location http://localhost:8080\n```\nUsando API_KEY\n```\ncurl --location 'http://localhost:8080/' --header 'API_KEY: 111'\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaelson%2Fgo-ratelimiter","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwaelson%2Fgo-ratelimiter","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwaelson%2Fgo-ratelimiter/lists"}