{"id":15527540,"url":"https://github.com/elliotchance/mocksqs","last_synced_at":"2025-04-23T12:27:34.743Z","repository":{"id":49132187,"uuid":"227344966","full_name":"elliotchance/mocksqs","owner":"elliotchance","description":"📤 In-memory implementation of SQS ideal for unit testing.","archived":false,"fork":false,"pushed_at":"2024-06-08T14:27:05.000Z","size":27,"stargazers_count":13,"open_issues_count":1,"forks_count":6,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-03-29T23:41:10.714Z","etag":null,"topics":["aws","mock","sqs","unit-testing"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/elliotchance.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}},"created_at":"2019-12-11T11:01:37.000Z","updated_at":"2024-03-09T12:02:04.000Z","dependencies_parsed_at":"2025-03-05T13:36:21.429Z","dependency_job_id":"b1bfef62-3eea-4b65-bf39-5ec28bffa42b","html_url":"https://github.com/elliotchance/mocksqs","commit_stats":null,"previous_names":[],"tags_count":10,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotchance%2Fmocksqs","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotchance%2Fmocksqs/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotchance%2Fmocksqs/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/elliotchance%2Fmocksqs/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/elliotchance","download_url":"https://codeload.github.com/elliotchance/mocksqs/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250433076,"owners_count":21429803,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":["aws","mock","sqs","unit-testing"],"created_at":"2024-10-02T11:07:00.590Z","updated_at":"2025-04-23T12:27:34.718Z","avatar_url":"https://github.com/elliotchance.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# 📤 github.com/elliotchance/mocksqs\n\n[![Build Status](https://travis-ci.org/elliotchance/mocksqs.svg?branch=master)](https://travis-ci.org/elliotchance/mocksqs)\n[![GoDoc](https://godoc.org/github.com/elliotchance/mocksqs?status.svg)](https://godoc.org/github.com/elliotchance/mocksqs)\n\n# Creating the Service\n\nThe simplest way to create a new SQS service is with `mocksqs.New()`. However,\nif you need queues prepopulated you can use `mocksqs.NewWithQueues()`:\n\n```go\nurl := \"https://sqs.us-east-1.amazonaws.com/281910179584/mocksqs\"\nclient := mocksqs.NewWithQueues(map[string][]string{\n\turl: {\"foo\", \"bar\"},\n})\n\nresult, err := client.ReceiveMessage(\u0026sqs.ReceiveMessageInput{\n\tQueueUrl: aws.String(url),\n})\n```\n\n# Supported Functionality\n\nOnly some of the common SQS methods are implemented. Methods not implemented\nwill panic.\n\nYou can view the specific implementation details in the\n[godoc documentation](https://godoc.org/github.com/elliotchance/mocksqs).\n\n# Events\n\nFunctions can be set on queues to help with unit testing life cycle. For\nexample:\n\n```go\nclient.GetQueue(url).OnEmptyQueue = func() {\n\t// Clean up, assert, cancel context, etc.\n}\n```\n\nSee the\n[documentation for Queue](https://godoc.org/github.com/elliotchance/mocksqs#Queue)\nfor more information.\n\n# Simulating HTTP Latency\n\nSimulateHTTPLatency when enabled will add a sleep between 20 and 100\nmilliseconds to each call that would otherwise need to make a HTTP request with\na real SQS client:\n\n```go\nclient.SimulateHTTPLatency = true\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felliotchance%2Fmocksqs","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Felliotchance%2Fmocksqs","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Felliotchance%2Fmocksqs/lists"}