Skip to content

Releases: speakeasy-api/speakeasy-go-sdk

v1.8.1: update gin dependency

26 Feb 21:58
Compare
Choose a tag to compare
feat: update gin dependency

v1.8.0: add support for retrieving path hints from a provided openapi document

02 Jun 10:15
2b884e3
Compare
Choose a tag to compare
Merge pull request #27 from speakeasy-api/add-openapi-support

feat: add support for retrieving path hints from an openapi document

v1.7.0: added support for net/http ServeMux routers

05 Jan 12:57
7e36cf9
Compare
Choose a tag to compare

This release adds support for routers based on the std lib net/http ServeMux in addition to the DefaultServerMux like DataDog's httptrace ServeMux https://pkg.go.dev/gopkg.in/DataDog/[email protected]/contrib/net/http

v1.6.0: drop support for go < v1.16.x due to updated dependencies

31 Oct 17:20
e8304a0
Compare
Choose a tag to compare
Merge pull request #22 from speakeasy-api/dependabot/go_modules/githu…

…b.com/labstack/echo/v4-4.9.0

chore(deps): bump github.com/labstack/echo/v4 from 4.7.2 to 4.9.0

v1.5.1: Enable GRPC Connection pooling

10 Oct 18:39
49a1468
Compare
Choose a tag to compare

v1.4.4: Updates to test suite and minor fixes to header handling

03 Oct 10:12
e70bc27
Compare
Choose a tag to compare
Merge pull request #21 from speakeasy-api/update-tests

chore: update SDK with latest test-suite output

v1.3.3: Add timeout to ingest rpc

22 Sep 14:30
84dcccd
Compare
Choose a tag to compare

This release adds a timeout to the ingest request, insuring that these request don't back up in the case of increasing latency

Fix: Improved handling of proxied urls

06 Sep 10:26
1fc3414
Compare
Choose a tag to compare
Merge pull request #19 from speakeasy-api/improve-url-parsing

fix: handle url resolution correctly

Fix: Better resolution of relative URLs and URLs behind proxies

06 Sep 08:17
6dd8a29
Compare
Choose a tag to compare
Merge pull request #18 from speakeasy-api/fix-url-resolving

fix: fixes resolving some relative and proxied URLs

Getting an Embed Access Token

25 Aug 09:08
05f84ea
Compare
Choose a tag to compare

The Speakeasy SDK now supports retrieving an access token for use with our Embedded Request Viewer feature.

Embedded Request Viewer Access Tokens

The Speakeasy SDK can generate access tokens for the Embedded Request Viewer that can be used to view requests captured by the SDK.

For documentation on how to configure filters, find that HERE.

Below are some examples on how to generate access tokens:

import "github.com/speakeasy-api/speakeasy-schemas/grpc/go/registry/embedaccesstoken"

ctx := context.Background()

// If the SDK is configured as a global instance, an access token can be generated using the `GenerateAccessToken` function on the speakeasy package.
accessToken, err := speakeasy.GetEmbedAccessToken(ctx, &embedaccesstoken.EmbedAccessTokenRequest{
	Filters: []*embedaccesstoken.EmbedAccessTokenRequest_Filter{
		{
			Key:   "customer_id",
			Operator: "=",
			Value: "a-customer-id",
		},
	},
})

// If you have followed the `Advanced Configuration` section above you can also generate an access token using the `GenerateAccessToken` function on the sdk instance.
accessToken, err := storeSDKInstance.GetEmbedAccessToken(ctx, &embedaccesstoken.EmbedAccessTokenRequest{
	Filters: []*embedaccesstoken.EmbedAccessTokenRequest_Filter{
		{
			Key:   "customer_id",
			Operator: "=",
			Value: "a-customer-id",
		},
	},
})

// Or finally if you have a handler that you would like to generate an access token from, you can get the SDK instance for that handler from the middleware controller and use the `GetEmbedAccessToken` function it.
func MyHandler(w http.ResponseWriter, r *http.Request) {
	ctrl := speakeasy.MiddlewareController(req)
	accessToken, err := ctrl.GetSDKInstance().GetEmbedAccessToken(ctx, &embedaccesstoken.EmbedAccessTokenRequest{
		Filters: []*embedaccesstoken.EmbedAccessTokenRequest_Filter{
			{
				Key:   "customer_id",
				Operator: "=",
				Value: "a-customer-id",
			},
		},
	})
	
	// the rest of your handlers code
}