|
1 | 1 | # speakeasy-go-sdk |
2 | | -The Speakeasy Go SDK for evaluating API requests/responses. Compatible with any API framework implemented on top of Go's native http library. |
3 | 2 |
|
4 | | -## Installation |
| 3 | + |
| 4 | + |
| 5 | +Speakeasy is your API Platform team as a service. Use our drop in SDK to manage all your API Operations including embeds for request logs and usage dashboards, test case generation from traffic, and understanding API drift. |
| 6 | + |
| 7 | +The Speakeasy Go SDK for evaluating API requests/responses. Compatible with any API framework implemented on top of Go's native http library. |
| 8 | + |
| 9 | +## Requirements |
| 10 | + |
| 11 | +Supported frameworks: |
| 12 | + |
| 13 | +* gorilla/mux |
| 14 | +* go-chi/chi |
| 15 | +* http.DefaultServerMux |
| 16 | + |
| 17 | +We also support custom Http frameworks: |
| 18 | + |
| 19 | +* gin-gonic/gin |
| 20 | +* labstack/echo |
| 21 | + |
| 22 | +## Usage |
| 23 | + |
5 | 24 | > Speakeasy uses [Go Modules](https://github.com/golang/go/wiki/Modules) to manage dependencies. |
6 | 25 |
|
7 | 26 | ```shell |
8 | 27 | go get github.com/speakeasy-api/speakeasy-go-sdk |
9 | 28 | ``` |
10 | 29 |
|
11 | 30 | ## Minimum configuration |
12 | | -Configure Speakeasy at the start of your `main()` function: |
| 31 | + |
| 32 | +[Sign up for free on our platform](https://www.speakeasyapi.dev/). After you've created a workspace and generated an API key enable Speakeasy in your API as follows: |
| 33 | + |
| 34 | +Configure Speakeasy at the start of your `main()` function with just 2 lines of code: |
13 | 35 |
|
14 | 36 | ```go |
15 | 37 | import "github.com/speakeasy-api/speakeasy-go-sdk" |
16 | 38 |
|
17 | 39 | func main() { |
18 | 40 | speakeasy.Configure(speakeasy.Configuration { |
19 | | - APIKey: "YOUR API KEY HERE", // retrieve from future Speakeasy dev dashboard |
| 41 | + APIKey: "YOUR API KEY HERE", // retrieve from Speakeasy API dashboard |
20 | 42 | }) |
21 | 43 | // rest of your program. |
22 | | - mux := http.NewServeMux() |
23 | | - mux.Handle("/", speakeasy.Middleware(yourHandler)) |
24 | 44 | } |
25 | 45 | ``` |
| 46 | + |
| 47 | +Build and deploy your app and that's it. Your API is being tracked in the Speakeasy workspace you just created |
| 48 | +and will be visible on the dashboard next time you log in. Visit our [docs site](https://docs.speakeasyapi.dev/) to |
| 49 | +learn more. |
| 50 | + |
| 51 | + |
26 | 52 | ## Optional Arguments |
27 | | -The only required argument to the Speakeasy configuration is your API key. There are some optional parameters which you can choose to include. The full list is found below: |
28 | | -```go |
29 | | -speakeasy.Configure(speakeasy.Configuration { |
30 | | - APIKey: "YOUR API KEY HERE", // Initialize with value from Speakeasy dev dashboard |
31 | | - PathHints: "REGEX EXPRESSION", //Regex expression for discovering new API endpoints |
32 | | - }) |
| 53 | + |
| 54 | +Coming soon ! |
33 | 55 | ``` |
0 commit comments