|
1 | 1 | # go-wiremock
|
2 | 2 |
|
| 3 | +[](http://godoc.org/github.com/wiremock/go-wiremock) |
3 | 4 | [](https://github.com/wiremock/go-wiremock/actions?query=workflow%3Abuild)
|
4 | 5 | [](https://goreportcard.com/report/github.com/wiremock/go-wiremock)
|
5 | 6 |
|
6 |
| -The simple package to stub HTTP resource using [WireMock admin](http://wiremock.org/docs/api/) |
| 7 | +<a href="https://go.wiremock.org" target="_blank"> |
| 8 | + <img width="128px" align="right" src="docs/images/logo/logo.png" alt="Go WireMock Logo"/> |
| 9 | +</a> |
| 10 | + |
| 11 | +The Golang client library to stub API resources in [WireMock](https://wiremock.org) using its |
| 12 | +[REST API](https://wiremock.org/docs/api/). |
| 13 | +The project connects to the instance and allows |
| 14 | +setting up stubs and response templating, |
| 15 | +or using administrative API to extract observability data. |
7 | 16 |
|
8 | 17 | ## Documentation
|
9 | 18 |
|
10 | 19 | [](http://godoc.org/github.com/wiremock/go-wiremock)
|
11 | 20 |
|
| 21 | +## Compatibility |
| 22 | + |
| 23 | +The library was tested with the following distributions |
| 24 | +of WireMock: |
| 25 | + |
| 26 | +- WireMock 2.x - standalone deployments, including but not limited to official Docker images, Helm charts and the Java executable |
| 27 | +- WireMock 3.x Beta - partial support, some features are |
| 28 | + yet to be implemented. Contributions are welcome! |
| 29 | +- [WireMock Cloud](https://www.wiremock.io/product) - |
| 30 | + proprietary SaaS edition by WireMock Inc. |
| 31 | + |
| 32 | +Note that the CI pipelines run only against the official community distributions of WireMock. |
| 33 | +It may work for custom builds and other distributions. |
| 34 | +Should there be any issues, contact their vendors/maintainers. |
| 35 | + |
12 | 36 | ## Usage
|
13 | 37 |
|
| 38 | +Launch a standalone Docker instance: |
| 39 | + |
14 | 40 | ```shell
|
15 | 41 | docker run -it --rm -p 8080:8080 wiremock/wiremock
|
16 | 42 | ```
|
17 | 43 |
|
| 44 | +Connect to it using the client library: |
| 45 | + |
18 | 46 | ```go
|
19 | 47 | package main
|
20 | 48 |
|
@@ -87,4 +115,8 @@ func TestSome(t *testing.T) {
|
87 | 115 |
|
88 | 116 | wiremockClient.DeleteStub(statusStub)
|
89 | 117 | }
|
90 |
| -``` |
| 118 | +``` |
| 119 | + |
| 120 | +## License |
| 121 | + |
| 122 | +[MIT License](./LICENSE) |
0 commit comments