{"id":18383982,"url":"https://github.com/speakeasy-sdks/hightouch-go-sdk","last_synced_at":"2025-04-11T23:28:26.348Z","repository":{"id":135630595,"uuid":"608487106","full_name":"speakeasy-sdks/hightouch-go-sdk","owner":"speakeasy-sdks","description":"A Go SDK for accessing the Hightouch API.","archived":false,"fork":false,"pushed_at":"2024-04-02T21:13:13.000Z","size":429,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":4,"default_branch":"main","last_synced_at":"2025-02-16T00:12:55.101Z","etag":null,"topics":["cdp","go","hightouch","sdk"],"latest_commit_sha":null,"homepage":"https://hightouch.com/docs/api-reference","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/speakeasy-sdks.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"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}},"created_at":"2023-03-02T05:40:24.000Z","updated_at":"2023-09-29T13:36:01.000Z","dependencies_parsed_at":"2023-10-11T02:35:15.826Z","dependency_job_id":"94784f31-df54-44a1-ad34-9a042b1a739c","html_url":"https://github.com/speakeasy-sdks/hightouch-go-sdk","commit_stats":null,"previous_names":[],"tags_count":66,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fhightouch-go-sdk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fhightouch-go-sdk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fhightouch-go-sdk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/speakeasy-sdks%2Fhightouch-go-sdk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/speakeasy-sdks","download_url":"https://codeload.github.com/speakeasy-sdks/hightouch-go-sdk/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248494342,"owners_count":21113419,"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":["cdp","go","hightouch","sdk"],"created_at":"2024-11-06T01:13:10.862Z","updated_at":"2025-04-11T23:28:26.302Z","avatar_url":"https://github.com/speakeasy-sdks.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"\u003cdiv align=\"center\"\u003e\n    \u003cpicture\u003e\n        \u003csource srcset=\"https://user-images.githubusercontent.com/6267663/221538824-87af0e1b-0508-4af5-b3b9-e4b192d8337f.svg\" media=\"(prefers-color-scheme: dark)\"\u003e\n        \u003cimg src=\"https://user-images.githubusercontent.com/6267663/221538828-de1343f2-b249-4ba2-85e3-a2e43cc5f265.svg\"\u003e\n    \u003c/picture\u003e\n    \u003ch1\u003eHightouch Go SDK\u003c/h1\u003e\n   \u003cp\u003eHightouch exposes a REST API that lets users interact with resources like syncs, models, sources and destinations.\u003c/p\u003e\n   \u003ca href=\"https://hightouch.com/docs/api-reference\"\u003e\u003cimg src=\"https://img.shields.io/static/v1?label=Docs\u0026message=API Ref\u0026color=000000\u0026style=for-the-badge\" /\u003e\u003c/a\u003e\n   \u003ca href=\"https://github.com/speakeasy-sdks/hightouch-go-sdk/actions\"\u003e\u003cimg src=\"https://img.shields.io/github/actions/workflow/status/speakeasy-sdks/hightouch-go-sdk/speakeasy_sdk_generation.yml?style=for-the-badge\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://opensource.org/licenses/MIT\"\u003e\u003cimg src=\"https://img.shields.io/badge/License-MIT-blue.svg?style=for-the-badge\" /\u003e\u003c/a\u003e\n  \u003ca href=\"https://github.com/speakeasy-sdks/hightouch-go-sdk/releases\"\u003e\u003cimg src=\"https://img.shields.io/github/v/release/speakeasy-sdks/hightouch-go-sdk?sort=semver\u0026style=for-the-badge\" /\u003e\u003c/a\u003e\n\u003c/div\u003e\n\n\u003c!-- Start SDK Installation [installation] --\u003e\n## SDK Installation\n\n```bash\ngo get github.com/speakeasy-sdks/hightouch-go-sdk\n```\n\u003c!-- End SDK Installation [installation] --\u003e\n\n## Authentication\n\n- Create an [API key](https://app.hightouch.com/settings/api-keys)\n- From the API keys tab on the Settings page, select Add API key.\n- Enter a descriptive Name for your key.\n- Copy your API key and store it in a safe location. The key will only be displayed once.\n- Click Create API key.\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\thightouchgosdk \"github.com/speakeasy-sdks/hightouch-go-sdk\"\n\t\"github.com/speakeasy-sdks/hightouch-go-sdk/pkg/models/shared\"\n\t\"log\"\n)\n\nfunc main() {\n\ts := hightouchgosdk.New(\n\t\thightouchgosdk.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n\t)\n\n\tctx := context.Background()\n\tres, err := s.CreateDestination(ctx, shared.DestinationCreate{\n\t\tConfiguration: map[string]interface{}{\n\t\t\t\"key\": \"\u003cvalue\u003e\",\n\t\t},\n\t\tName: \"\u003cvalue\u003e\",\n\t\tSlug: \"\u003cvalue\u003e\",\n\t\tType: \"\u003cvalue\u003e\",\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif res.OneOf != 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### [Hightouch SDK](docs/sdks/hightouch/README.md)\n\n* [CreateDestination](docs/sdks/hightouch/README.md#createdestination) - Create Destination\n* [CreateModel](docs/sdks/hightouch/README.md#createmodel) - Create Model\n* [CreateSource](docs/sdks/hightouch/README.md#createsource) - Create Source\n* [CreateSync](docs/sdks/hightouch/README.md#createsync) - Create Sync\n* [GetDestination](docs/sdks/hightouch/README.md#getdestination) - Get Destination\n* [GetModel](docs/sdks/hightouch/README.md#getmodel) - Get Model\n* [GetSource](docs/sdks/hightouch/README.md#getsource) - Get Source\n* [GetSync](docs/sdks/hightouch/README.md#getsync) - Get Sync\n* [GetSyncSequenceRun](docs/sdks/hightouch/README.md#getsyncsequencerun) - Sync sequence status\n* [ListDestination](docs/sdks/hightouch/README.md#listdestination) - List Destinations\n* [ListModel](docs/sdks/hightouch/README.md#listmodel) - List Models\n* [ListSource](docs/sdks/hightouch/README.md#listsource) - List Sources\n* [ListSync](docs/sdks/hightouch/README.md#listsync) - List Syncs\n* [ListSyncRuns](docs/sdks/hightouch/README.md#listsyncruns) - List Sync Runs\n* [TriggerRun](docs/sdks/hightouch/README.md#triggerrun) - Trigger Sync\n* [TriggerRunCustom](docs/sdks/hightouch/README.md#triggerruncustom) - Trigger Sync From ID or Slug\n* [TriggerRunIDGraph](docs/sdks/hightouch/README.md#triggerrunidgraph)\n* [TriggerSequenceRun](docs/sdks/hightouch/README.md#triggersequencerun) - Trigger Sync sequence\n* [UpdateDestination](docs/sdks/hightouch/README.md#updatedestination) - Update Destination\n* [UpdateModel](docs/sdks/hightouch/README.md#updatemodel) - Update Model\n* [UpdateSource](docs/sdks/hightouch/README.md#updatesource) - Update Source\n* [UpdateSync](docs/sdks/hightouch/README.md#updatesync) - Update Sync\n\u003c!-- End Available Resources and Operations [operations] --\u003e\n\n\n\n\n\n\n\n\u003c!-- Start Special Types [types] --\u003e\n## Special Types\n\n\n\u003c!-- End Special Types [types] --\u003e\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.  When specified by the OpenAPI spec document, the SDK will return the appropriate subclass.\n\n| Error Object                | Status Code                 | Content Type                |\n| --------------------------- | --------------------------- | --------------------------- |\n| sdkerrors.ValidateErrorJSON | 409,422                     | application/json            |\n| sdkerrors.SDKError          | 4xx-5xx                     | */*                         |\n\n### Example\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\t\"errors\"\n\thightouchgosdk \"github.com/speakeasy-sdks/hightouch-go-sdk\"\n\t\"github.com/speakeasy-sdks/hightouch-go-sdk/pkg/models/sdkerrors\"\n\t\"github.com/speakeasy-sdks/hightouch-go-sdk/pkg/models/shared\"\n\t\"log\"\n)\n\nfunc main() {\n\ts := hightouchgosdk.New(\n\t\thightouchgosdk.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n\t)\n\n\tctx := context.Background()\n\tres, err := s.CreateDestination(ctx, shared.DestinationCreate{\n\t\tConfiguration: map[string]interface{}{\n\t\t\t\"key\": \"\u003cvalue\u003e\",\n\t\t},\n\t\tName: \"\u003cvalue\u003e\",\n\t\tSlug: \"\u003cvalue\u003e\",\n\t\tType: \"\u003cvalue\u003e\",\n\t})\n\tif err != nil {\n\n\t\tvar e *sdkerrors.ValidateErrorJSON\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 Index\n\nYou can override the default server globally using the `WithServerIndex` 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 indexes associated with the available servers:\n\n| # | Server | Variables |\n| - | ------ | --------- |\n| 0 | `https://api.hightouch.com/api/v1` | None |\n\n#### Example\n\n```go\npackage main\n\nimport (\n\t\"context\"\n\thightouchgosdk \"github.com/speakeasy-sdks/hightouch-go-sdk\"\n\t\"github.com/speakeasy-sdks/hightouch-go-sdk/pkg/models/shared\"\n\t\"log\"\n)\n\nfunc main() {\n\ts := hightouchgosdk.New(\n\t\thightouchgosdk.WithServerIndex(0),\n\t\thightouchgosdk.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n\t)\n\n\tctx := context.Background()\n\tres, err := s.CreateDestination(ctx, shared.DestinationCreate{\n\t\tConfiguration: map[string]interface{}{\n\t\t\t\"key\": \"\u003cvalue\u003e\",\n\t\t},\n\t\tName: \"\u003cvalue\u003e\",\n\t\tSlug: \"\u003cvalue\u003e\",\n\t\tType: \"\u003cvalue\u003e\",\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif res.OneOf != nil {\n\t\t// handle response\n\t}\n}\n\n```\n\n\n### Override Server URL Per-Client\n\nThe default server can also be overridden globally using the `WithServerURL` option when initializing the SDK client instance. For example:\n```go\npackage main\n\nimport (\n\t\"context\"\n\thightouchgosdk \"github.com/speakeasy-sdks/hightouch-go-sdk\"\n\t\"github.com/speakeasy-sdks/hightouch-go-sdk/pkg/models/shared\"\n\t\"log\"\n)\n\nfunc main() {\n\ts := hightouchgosdk.New(\n\t\thightouchgosdk.WithServerURL(\"https://api.hightouch.com/api/v1\"),\n\t\thightouchgosdk.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n\t)\n\n\tctx := context.Background()\n\tres, err := s.CreateDestination(ctx, shared.DestinationCreate{\n\t\tConfiguration: map[string]interface{}{\n\t\t\t\"key\": \"\u003cvalue\u003e\",\n\t\t},\n\t\tName: \"\u003cvalue\u003e\",\n\t\tSlug: \"\u003cvalue\u003e\",\n\t\tType: \"\u003cvalue\u003e\",\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif res.OneOf != 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 scheme globally:\n\n| Name         | Type         | Scheme       |\n| ------------ | ------------ | ------------ |\n| `BearerAuth` | http         | HTTP Bearer  |\n\nYou can configure it using the `WithSecurity` option when initializing the SDK client instance. For example:\n```go\npackage main\n\nimport (\n\t\"context\"\n\thightouchgosdk \"github.com/speakeasy-sdks/hightouch-go-sdk\"\n\t\"github.com/speakeasy-sdks/hightouch-go-sdk/pkg/models/shared\"\n\t\"log\"\n)\n\nfunc main() {\n\ts := hightouchgosdk.New(\n\t\thightouchgosdk.WithSecurity(\"\u003cYOUR_BEARER_TOKEN_HERE\u003e\"),\n\t)\n\n\tctx := context.Background()\n\tres, err := s.CreateDestination(ctx, shared.DestinationCreate{\n\t\tConfiguration: map[string]interface{}{\n\t\t\t\"key\": \"\u003cvalue\u003e\",\n\t\t},\n\t\tName: \"\u003cvalue\u003e\",\n\t\tSlug: \"\u003cvalue\u003e\",\n\t\tType: \"\u003cvalue\u003e\",\n\t})\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tif res.OneOf != nil {\n\t\t// handle response\n\t}\n}\n\n```\n\u003c!-- End Authentication [security] --\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-sdks%2Fhightouch-go-sdk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fspeakeasy-sdks%2Fhightouch-go-sdk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fspeakeasy-sdks%2Fhightouch-go-sdk/lists"}