{"id":22089888,"url":"https://github.com/speakeasy-api/speakeasy-client-sdk-go","last_synced_at":"2025-07-24T19:31:36.993Z","repository":{"id":61626504,"uuid":"528883468","full_name":"speakeasy-api/speakeasy-client-sdk-go","owner":"speakeasy-api","description":"Developer-friendly \u0026 type-safe Go SDK specifically catered to leverage the Speakeasy API.","archived":false,"fork":false,"pushed_at":"2024-11-27T22:03:35.000Z","size":1805,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":13,"default_branch":"main","last_synced_at":"2024-11-30T19:44:54.171Z","etag":null,"topics":["go","sdk","speakeasy"],"latest_commit_sha":null,"homepage":"https://speakeasy.com","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"apache-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/speakeasy-api.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","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":"2022-08-25T14:19:08.000Z","updated_at":"2024-11-27T22:03:37.000Z","dependencies_parsed_at":"2023-10-05T15:45:28.991Z","dependency_job_id":"87f92056-dc8b-48e2-911a-16269efe8ea8","html_url":"https://github.com/speakeasy-api/speakeasy-client-sdk-go","commit_stats":null,"previous_names":[],"tags_count":191,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fspeakeasy-client-sdk-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fspeakeasy-client-sdk-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fspeakeasy-client-sdk-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-api%2Fspeakeasy-client-sdk-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/speakeasy-api","download_url":"https://codeload.github.com/speakeasy-api/speakeasy-client-sdk-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":227470069,"owners_count":17778930,"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":["go","sdk","speakeasy"],"created_at":"2024-12-01T02:14:38.566Z","updated_at":"2025-07-24T19:31:36.980Z","avatar_url":"https://github.com/speakeasy-api.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cpicture\u003e\n\t\u003csource media=\"(prefers-color-scheme: light)\" srcset=\"https://github.com/user-attachments/assets/5dbef0ff-ee5f-4e8f-8abd-9f57e3310cb9\"\u003e\n\t\u003csource media=\"(prefers-color-scheme: dark)\" srcset=\"https://github.com/user-attachments/assets/38058088-ac68-443e-9d63-94200c201759\"\u003e\n\t\u003cimg width=\"400px\" src=\"https://github.com/user-attachments/assets/5dbef0ff-ee5f-4e8f-8abd-9f57e3310cb9#gh-light-mode-only\" alt=\"Speakeasy\"\u003e\n    \u003c/picture\u003e\n    \u003ch1\u003eSpeakeasy Go SDK\u003c/h1\u003e\n    \u003cp\u003e\u003cstrong\u003eThe platform to build, test, document and distribute APIs to your users ❤️ Building really high quality APIs is hard. Speakeasy is a set of OpenAPI tools to make it easier.\u003c/strong\u003e\u003c/p\u003e\n    \u003cp\u003eDeveloper-friendly \u0026 type-safe Go SDK specifically catered to leverage the \u003cstrong\u003eSpeakeasy\u003c/strong\u003e API.\u003c/p\u003e\n    \u003ca href=\"https://speakeasy.com/\"\u003e\u003cimg src=\"https://custom-icon-badges.demolab.com/badge/-Read%20The%20Docs-212015?style=for-the-badge\u0026logoColor=FBE331\u0026logo=speakeasy\u0026labelColor=545454\" /\u003e\u003c/a\u003e\n    \u003ca href=\"https://join.slack.com/t/speakeasy-dev/shared_invite/zt-1cwb3flxz-lS5SyZxAsF_3NOq5xc8Cjw\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?label=Slack\u0026message=Join\u0026color=7289da\u0026style=for-the-badge\" /\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\n\u003c!-- Start Summary [summary] --\u003e\n## Summary\n\nSpeakeasy API: The Subscriptions API manages subscriptions for CLI and registry events\n\nFor more information about the API: [The Speakeasy Platform Documentation](/docs)\n\u003c!-- End Summary [summary] --\u003e\n\n\u003c!-- Start Table of Contents [toc] --\u003e\n## Table of Contents\n\u003c!-- $toc-max-depth=2 --\u003e\n  * [SDK Installation](#sdk-installation)\n  * [SDK Example Usage](#sdk-example-usage)\n  * [Available Resources and Operations](#available-resources-and-operations)\n  * [Error Handling](#error-handling)\n  * [Server Selection](#server-selection)\n  * [Custom HTTP Client](#custom-http-client)\n  * [Authentication](#authentication)\n  * [Global Parameters](#global-parameters)\n  * [Retries](#retries)\n\n\u003c!-- End Table of Contents [toc] --\u003e\n\n\u003c!-- Start SDK Installation [installation] --\u003e\n## SDK Installation\n\nTo add the SDK as a dependency to your project:\n```bash\ngo get github.com/speakeasy-api/speakeasy-client-sdk-go\n```\n\u003c!-- End SDK Installation [installation] --\u003e\n\n\u003c!-- Start SDK Example Usage [usage] --\u003e\n## SDK Example Usage\n\n### Example\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\tspeakeasyclientsdkgo \"github.com/speakeasy-api/speakeasy-client-sdk-go/v3\"\n\t\"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared\"\n\t\"log\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\ts := speakeasyclientsdkgo.New(\n\t\tspeakeasyclientsdkgo.WithSecurity(shared.Security{\n\t\t\tAPIKey: speakeasyclientsdkgo.String(\"\u003cYOUR_API_KEY_HERE\u003e\"),\n\t\t}),\n\t)\n\n\tres, err := s.Artifacts.CreateRemoteSource(ctx, nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif res != nil {\n\t\t// handle response\n\t}\n}\n\n```\n\u003c!-- End SDK Example Usage [usage] --\u003e\n\n\u003c!-- Start Available Resources and Operations [operations] --\u003e\n## Available Resources and Operations\n\n\u003cdetails open\u003e\n\u003csummary\u003eAvailable methods\u003c/summary\u003e\n\n### [Artifacts](docs/sdks/artifacts/README.md)\n\n* [CreateRemoteSource](docs/sdks/artifacts/README.md#createremotesource) - Configure a new remote source\n* [GetBlob](docs/sdks/artifacts/README.md#getblob) - Get blob for a particular digest\n* [GetManifest](docs/sdks/artifacts/README.md#getmanifest) - Get manifest for a particular reference\n* [GetNamespaces](docs/sdks/artifacts/README.md#getnamespaces) - Each namespace contains many revisions.\n* [GetRevisions](docs/sdks/artifacts/README.md#getrevisions)\n* [GetTags](docs/sdks/artifacts/README.md#gettags)\n* [ListRemoteSources](docs/sdks/artifacts/README.md#listremotesources) - Get remote sources attached to a particular namespace\n* [PostTags](docs/sdks/artifacts/README.md#posttags) - Add tags to an existing revision\n* [Preflight](docs/sdks/artifacts/README.md#preflight) - Get access token for communicating with OCI distribution endpoints\n* [SetArchived](docs/sdks/artifacts/README.md#setarchived) - Set whether a namespace is archived\n* [SetVisibility](docs/sdks/artifacts/README.md#setvisibility) - Set visibility of a namespace with an existing metadata entry\n\n### [Auth](docs/sdks/auth/README.md)\n\n* [GetAccess](docs/sdks/auth/README.md#getaccess) - Get access allowances for a particular workspace\n* [GetAccessToken](docs/sdks/auth/README.md#getaccesstoken) - Get or refresh an access token for the current workspace.\n* [GetUser](docs/sdks/auth/README.md#getuser) - Get information about the current user.\n* [ValidateAPIKey](docs/sdks/auth/README.md#validateapikey) - Validate the current api key.\n\n### [CodeSamples](docs/sdks/codesamples/README.md)\n\n* [GenerateCodeSamplePreview](docs/sdks/codesamples/README.md#generatecodesamplepreview) - Generate Code Sample previews from a file and configuration parameters.\n* [GenerateCodeSamplePreviewAsync](docs/sdks/codesamples/README.md#generatecodesamplepreviewasync) - Initiate asynchronous Code Sample preview generation from a file and configuration parameters, receiving an async JobID response for polling.\n* [Get](docs/sdks/codesamples/README.md#get) - Retrieve usage snippets\n* [GetCodeSamplePreviewAsync](docs/sdks/codesamples/README.md#getcodesamplepreviewasync) - Poll for the result of an asynchronous Code Sample preview generation.\n\n### [Events](docs/sdks/events/README.md)\n\n* [GetEventsByTarget](docs/sdks/events/README.md#geteventsbytarget) - Load recent events for a particular workspace\n* [GetTargets](docs/sdks/events/README.md#gettargets) - Load targets for a particular workspace\n* [GetTargetsDeprecated](docs/sdks/events/README.md#gettargetsdeprecated) - Load targets for a particular workspace\n* [Post](docs/sdks/events/README.md#post) - Post events for a specific workspace\n* [Search](docs/sdks/events/README.md#search) - Search events for a particular workspace by any field\n\n### [Github](docs/sdks/github/README.md)\n\n* [CheckAccess](docs/sdks/github/README.md#checkaccess)\n* [CheckPublishingPRs](docs/sdks/github/README.md#checkpublishingprs)\n* [CheckPublishingSecrets](docs/sdks/github/README.md#checkpublishingsecrets)\n* [ConfigureCodeSamples](docs/sdks/github/README.md#configurecodesamples)\n* [ConfigureMintlifyRepo](docs/sdks/github/README.md#configuremintlifyrepo)\n* [ConfigureTarget](docs/sdks/github/README.md#configuretarget)\n* [GetAction](docs/sdks/github/README.md#getaction)\n* [GetSetup](docs/sdks/github/README.md#getsetup)\n* [LinkGithub](docs/sdks/github/README.md#linkgithub)\n* [StorePublishingSecrets](docs/sdks/github/README.md#storepublishingsecrets)\n* [TriggerAction](docs/sdks/github/README.md#triggeraction)\n\n### [Organizations](docs/sdks/organizations/README.md)\n\n* [Create](docs/sdks/organizations/README.md#create) - Create an organization\n* [CreateBillingAddOns](docs/sdks/organizations/README.md#createbillingaddons) - Create billing add ons\n* [CreateFreeTrial](docs/sdks/organizations/README.md#createfreetrial) - Create a free trial for an organization\n* [DeleteBillingAddOn](docs/sdks/organizations/README.md#deletebillingaddon) - Delete billing add ons\n* [Get](docs/sdks/organizations/README.md#get) - Get organization\n* [GetAll](docs/sdks/organizations/README.md#getall) - Get organizations for a user\n* [GetBillingAddOns](docs/sdks/organizations/README.md#getbillingaddons) - Get billing add ons\n* [GetUsage](docs/sdks/organizations/README.md#getusage) - Get billing usage summary for a particular organization\n\n### [PublishingTokens](docs/sdks/publishingtokens/README.md)\n\n* [Create](docs/sdks/publishingtokens/README.md#create) - Create a publishing token for a workspace\n* [Delete](docs/sdks/publishingtokens/README.md#delete) - Delete a specific publishing token\n* [Get](docs/sdks/publishingtokens/README.md#get) - Get a specific publishing token\n* [List](docs/sdks/publishingtokens/README.md#list) - Get publishing tokens for a workspace\n* [ResolveMetadata](docs/sdks/publishingtokens/README.md#resolvemetadata) - Get metadata about the token\n* [ResolveTarget](docs/sdks/publishingtokens/README.md#resolvetarget) - Get a specific publishing token target\n* [Update](docs/sdks/publishingtokens/README.md#update) - Updates the validitity period of a publishing token\n\n### [Reports](docs/sdks/reports/README.md)\n\n* [GetChangesReportSignedURL](docs/sdks/reports/README.md#getchangesreportsignedurl) - Get the signed access url for the change reports for a particular document.\n* [GetLintingReportSignedURL](docs/sdks/reports/README.md#getlintingreportsignedurl) - Get the signed access url for the linting reports for a particular document.\n* [UploadReport](docs/sdks/reports/README.md#uploadreport) - Upload a report.\n\n### [SchemaStore](docs/sdks/schemastore/README.md)\n\n* [CreateSchemaStoreItem](docs/sdks/schemastore/README.md#createschemastoreitem) - Create a schema in the schema store\n* [GetSchemaStoreItem](docs/sdks/schemastore/README.md#getschemastoreitem) - Get a OAS schema from the schema store\n\n### [ShortURLs](docs/sdks/shorturls/README.md)\n\n* [Create](docs/sdks/shorturls/README.md#create) - Shorten a URL.\n\n\n### [Subscriptions](docs/sdks/subscriptions/README.md)\n\n* [ActivateSubscriptionNamespace](docs/sdks/subscriptions/README.md#activatesubscriptionnamespace) - Activate an ignored namespace for a subscription\n* [IgnoreSubscriptionNamespace](docs/sdks/subscriptions/README.md#ignoresubscriptionnamespace) - Ignored a namespace for a subscription\n\n### [Suggest](docs/sdks/suggest/README.md)\n\n* [Suggest](docs/sdks/suggest/README.md#suggest) - Generate suggestions for improving an OpenAPI document.\n* [SuggestItems](docs/sdks/suggest/README.md#suggestitems) - Generate generic suggestions for a list of items.\n* [SuggestOpenAPI](docs/sdks/suggest/README.md#suggestopenapi) - (DEPRECATED) Generate suggestions for improving an OpenAPI document.\n* [SuggestOpenAPIRegistry](docs/sdks/suggest/README.md#suggestopenapiregistry) - Generate suggestions for improving an OpenAPI document stored in the registry.\n\n### [Workspaces](docs/sdks/workspaces/README.md)\n\n* [Create](docs/sdks/workspaces/README.md#create) - Create a workspace\n* [CreateToken](docs/sdks/workspaces/README.md#createtoken) - Create a token for a particular workspace\n* [DeleteToken](docs/sdks/workspaces/README.md#deletetoken) - Delete a token for a particular workspace\n* [Get](docs/sdks/workspaces/README.md#get) - Get workspace by context\n* [GetAll](docs/sdks/workspaces/README.md#getall) - Get workspaces for a user\n* [GetByID](docs/sdks/workspaces/README.md#getbyid) - Get workspace\n* [GetFeatureFlags](docs/sdks/workspaces/README.md#getfeatureflags) - Get workspace feature flags\n* [GetSettings](docs/sdks/workspaces/README.md#getsettings) - Get workspace settings\n* [GetTeam](docs/sdks/workspaces/README.md#getteam) - Get team members for a particular workspace\n* [GetTokens](docs/sdks/workspaces/README.md#gettokens) - Get tokens for a particular workspace\n* [GrantAccess](docs/sdks/workspaces/README.md#grantaccess) - Grant a user access to a particular workspace\n* [RevokeAccess](docs/sdks/workspaces/README.md#revokeaccess) - Revoke a user's access to a particular workspace\n* [SetFeatureFlags](docs/sdks/workspaces/README.md#setfeatureflags) - Set workspace feature flags\n* [Update](docs/sdks/workspaces/README.md#update) - Update workspace details\n* [UpdateSettings](docs/sdks/workspaces/README.md#updatesettings) - Update workspace settings\n\n\u003c/details\u003e\n\u003c!-- End Available Resources and Operations [operations] --\u003e\n\n\n\n\n\n\n\n\n\n\u003c!-- Start Error Handling [errors] --\u003e\n## Error Handling\n\nHandling errors in this SDK should largely match your expectations. All operations return a response object or an error, they will never return both.\n\nBy Default, an API error will return `sdkerrors.SDKError`. When custom error responses are specified for an operation, the SDK may also return their associated error. You can refer to respective *Errors* tables in SDK docs for more details on possible error types for each operation.\n\nFor example, the `CreateRemoteSource` function may return the following errors:\n\n| Error Type         | Status Code | Content Type     |\n| ------------------ | ----------- | ---------------- |\n| sdkerrors.Error    | 4XX         | application/json |\n| sdkerrors.SDKError | 5XX         | \\*/\\*            |\n\n### Example\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\tspeakeasyclientsdkgo \"github.com/speakeasy-api/speakeasy-client-sdk-go/v3\"\n\t\"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/sdkerrors\"\n\t\"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared\"\n\t\"log\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\ts := speakeasyclientsdkgo.New(\n\t\tspeakeasyclientsdkgo.WithSecurity(shared.Security{\n\t\t\tAPIKey: speakeasyclientsdkgo.String(\"\u003cYOUR_API_KEY_HERE\u003e\"),\n\t\t}),\n\t)\n\n\tres, err := s.Artifacts.CreateRemoteSource(ctx, nil)\n\tif err != nil {\n\n\t\tvar e *sdkerrors.Error\n\t\tif errors.As(err, \u0026e) {\n\t\t\t// handle error\n\t\t\tlog.Fatal(e.Error())\n\t\t}\n\n\t\tvar e *sdkerrors.SDKError\n\t\tif errors.As(err, \u0026e) {\n\t\t\t// handle error\n\t\t\tlog.Fatal(e.Error())\n\t\t}\n\t}\n}\n\n```\n\u003c!-- End Error Handling [errors] --\u003e\n\n\n\n\u003c!-- Start Server Selection [server] --\u003e\n## Server Selection\n\n### Select Server by Name\n\nYou can override the default server globally using the `WithServer(server string)` option when initializing the SDK client instance. The selected server will then be used as the default on the operations that use it. This table lists the names associated with the available servers:\n\n| Name   | Server                           | Description |\n| ------ | -------------------------------- | ----------- |\n| `prod` | `https://api.prod.speakeasy.com` |             |\n\n#### Example\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\tspeakeasyclientsdkgo \"github.com/speakeasy-api/speakeasy-client-sdk-go/v3\"\n\t\"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared\"\n\t\"log\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\ts := speakeasyclientsdkgo.New(\n\t\tspeakeasyclientsdkgo.WithServer(\"prod\"),\n\t\tspeakeasyclientsdkgo.WithSecurity(shared.Security{\n\t\t\tAPIKey: speakeasyclientsdkgo.String(\"\u003cYOUR_API_KEY_HERE\u003e\"),\n\t\t}),\n\t)\n\n\tres, err := s.Artifacts.CreateRemoteSource(ctx, nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif res != nil {\n\t\t// handle response\n\t}\n}\n\n```\n\n### Override Server URL Per-Client\n\nThe default server can also be overridden globally using the `WithServerURL(serverURL string)` option when initializing the SDK client instance. For example:\n```go\npackage main\n\nimport (\n\t\"context\"\n\tspeakeasyclientsdkgo \"github.com/speakeasy-api/speakeasy-client-sdk-go/v3\"\n\t\"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared\"\n\t\"log\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\ts := speakeasyclientsdkgo.New(\n\t\tspeakeasyclientsdkgo.WithServerURL(\"https://api.prod.speakeasy.com\"),\n\t\tspeakeasyclientsdkgo.WithSecurity(shared.Security{\n\t\t\tAPIKey: speakeasyclientsdkgo.String(\"\u003cYOUR_API_KEY_HERE\u003e\"),\n\t\t}),\n\t)\n\n\tres, err := s.Artifacts.CreateRemoteSource(ctx, nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif res != nil {\n\t\t// handle response\n\t}\n}\n\n```\n\u003c!-- End Server Selection [server] --\u003e\n\n\n\n\u003c!-- Start Custom HTTP Client [http-client] --\u003e\n## Custom HTTP Client\n\nThe Go SDK makes API calls that wrap an internal HTTP client. The requirements for the HTTP client are very simple. It must match this interface:\n\n```go\ntype HTTPClient interface {\n\tDo(req *http.Request) (*http.Response, error)\n}\n```\n\nThe built-in `net/http` client satisfies this interface and a default client based on the built-in is provided by default. To replace this default with a client of your own, you can implement this interface yourself or provide your own client configured as desired. Here's a simple example, which adds a client with a 30 second timeout.\n\n```go\nimport (\n\t\"net/http\"\n\t\"time\"\n\t\"github.com/myorg/your-go-sdk\"\n)\n\nvar (\n\thttpClient = \u0026http.Client{Timeout: 30 * time.Second}\n\tsdkClient  = sdk.New(sdk.WithClient(httpClient))\n)\n```\n\nThis can be a convenient way to configure timeouts, cookies, proxies, custom headers, and other low-level configuration.\n\u003c!-- End Custom HTTP Client [http-client] --\u003e\n\n\n\n\u003c!-- Start Authentication [security] --\u003e\n## Authentication\n\n### Per-Client Security Schemes\n\nThis SDK supports the following security schemes globally:\n\n| Name                  | Type   | Scheme      |\n| --------------------- | ------ | ----------- |\n| `APIKey`              | apiKey | API key     |\n| `Bearer`              | http   | HTTP Bearer |\n| `WorkspaceIdentifier` | apiKey | API key     |\n\nYou can set the security parameters through the `WithSecurity` option when initializing the SDK client instance. The selected scheme will be used by default to authenticate with the API for all operations that support it. For example:\n```go\npackage main\n\nimport (\n\t\"context\"\n\tspeakeasyclientsdkgo \"github.com/speakeasy-api/speakeasy-client-sdk-go/v3\"\n\t\"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared\"\n\t\"log\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\ts := speakeasyclientsdkgo.New(\n\t\tspeakeasyclientsdkgo.WithSecurity(shared.Security{\n\t\t\tAPIKey: speakeasyclientsdkgo.String(\"\u003cYOUR_API_KEY_HERE\u003e\"),\n\t\t}),\n\t)\n\n\tres, err := s.Artifacts.CreateRemoteSource(ctx, nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif res != nil {\n\t\t// handle response\n\t}\n}\n\n```\n\u003c!-- End Authentication [security] --\u003e\n\n\u003c!-- Start Global Parameters [global-parameters] --\u003e\n## Global Parameters\n\nA parameter is configured globally. This parameter may be set on the SDK client instance itself during initialization. When configured as an option during SDK initialization, This global value will be used as the default on the operations that use it. When such operations are called, there is a place in each to override the global value, if needed.\n\nFor example, you can set `workspace_id` to `\"\u003cid\u003e\"` at SDK initialization and then you do not have to pass the same value on calls to operations like `GetAccessToken`. But if you want to do so you may, which will locally override the global setting. See the example code below for a demonstration.\n\n\n### Available Globals\n\nThe following global parameter is available.\n\n| Name        | Type   | Description                |\n| ----------- | ------ | -------------------------- |\n| WorkspaceID | string | The WorkspaceID parameter. |\n\n### Example\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\tspeakeasyclientsdkgo \"github.com/speakeasy-api/speakeasy-client-sdk-go/v3\"\n\t\"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/operations\"\n\t\"log\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\ts := speakeasyclientsdkgo.New()\n\n\tres, err := s.Auth.GetAccessToken(ctx, operations.GetAccessTokenRequest{\n\t\tWorkspaceID: \"\u003cid\u003e\",\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif res.AccessToken != nil {\n\t\t// handle response\n\t}\n}\n\n```\n\u003c!-- End Global Parameters [global-parameters] --\u003e\n\n\u003c!-- Start Retries [retries] --\u003e\n## Retries\n\nSome of the endpoints in this SDK support retries. If you use the SDK without any configuration, it will fall back to the default retry strategy provided by the API. However, the default retry strategy can be overridden on a per-operation basis, or across the entire SDK.\n\nTo change the default retry strategy for a single API call, simply provide a `retry.Config` object to the call by using the `WithRetries` option:\n```go\npackage main\n\nimport (\n\t\"context\"\n\tspeakeasyclientsdkgo \"github.com/speakeasy-api/speakeasy-client-sdk-go/v3\"\n\t\"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared\"\n\t\"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/retry\"\n\t\"log\"\n\t\"pkg/models/operations\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\ts := speakeasyclientsdkgo.New(\n\t\tspeakeasyclientsdkgo.WithSecurity(shared.Security{\n\t\t\tAPIKey: speakeasyclientsdkgo.String(\"\u003cYOUR_API_KEY_HERE\u003e\"),\n\t\t}),\n\t)\n\n\tres, err := s.Artifacts.CreateRemoteSource(ctx, nil, operations.WithRetries(\n\t\tretry.Config{\n\t\t\tStrategy: \"backoff\",\n\t\t\tBackoff: \u0026retry.BackoffStrategy{\n\t\t\t\tInitialInterval: 1,\n\t\t\t\tMaxInterval:     50,\n\t\t\t\tExponent:        1.1,\n\t\t\t\tMaxElapsedTime:  100,\n\t\t\t},\n\t\t\tRetryConnectionErrors: false,\n\t\t}))\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif res != nil {\n\t\t// handle response\n\t}\n}\n\n```\n\nIf you'd like to override the default retry strategy for all operations that support retries, you can use the `WithRetryConfig` option at SDK initialization:\n```go\npackage main\n\nimport (\n\t\"context\"\n\tspeakeasyclientsdkgo \"github.com/speakeasy-api/speakeasy-client-sdk-go/v3\"\n\t\"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/models/shared\"\n\t\"github.com/speakeasy-api/speakeasy-client-sdk-go/v3/pkg/retry\"\n\t\"log\"\n)\n\nfunc main() {\n\tctx := context.Background()\n\n\ts := speakeasyclientsdkgo.New(\n\t\tspeakeasyclientsdkgo.WithRetryConfig(\n\t\t\tretry.Config{\n\t\t\t\tStrategy: \"backoff\",\n\t\t\t\tBackoff: \u0026retry.BackoffStrategy{\n\t\t\t\t\tInitialInterval: 1,\n\t\t\t\t\tMaxInterval:     50,\n\t\t\t\t\tExponent:        1.1,\n\t\t\t\t\tMaxElapsedTime:  100,\n\t\t\t\t},\n\t\t\t\tRetryConnectionErrors: false,\n\t\t\t}),\n\t\tspeakeasyclientsdkgo.WithSecurity(shared.Security{\n\t\t\tAPIKey: speakeasyclientsdkgo.String(\"\u003cYOUR_API_KEY_HERE\u003e\"),\n\t\t}),\n\t)\n\n\tres, err := s.Artifacts.CreateRemoteSource(ctx, nil)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif res != nil {\n\t\t// handle response\n\t}\n}\n\n```\n\u003c!-- End Retries [retries] --\u003e\n\n\u003c!-- Placeholder for Future Speakeasy SDK Sections --\u003e\n\n\n\n### SDK Generated by [Speakeasy](https://docs.speakeasyapi.dev/docs/using-speakeasy/client-sdks)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-api%2Fspeakeasy-client-sdk-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspeakeasy-api%2Fspeakeasy-client-sdk-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-api%2Fspeakeasy-client-sdk-go/lists"}