{"id":20770624,"url":"https://github.com/ably/ably-control-go","last_synced_at":"2025-08-30T23:40:01.844Z","repository":{"id":52276897,"uuid":"516788194","full_name":"ably/ably-control-go","owner":"ably","description":"Incubating. SDK Team. Go client library SDK for Ably control API.","archived":false,"fork":false,"pushed_at":"2025-03-18T12:48:39.000Z","size":90,"stargazers_count":0,"open_issues_count":0,"forks_count":1,"subscribers_count":23,"default_branch":"main","last_synced_at":"2025-03-30T16:46:04.080Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/ably.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","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-07-22T14:50:48.000Z","updated_at":"2025-03-18T12:48:17.000Z","dependencies_parsed_at":"2024-02-01T10:50:05.437Z","dependency_job_id":"b7066b18-1240-4938-bec1-dc972e73ba86","html_url":"https://github.com/ably/ably-control-go","commit_stats":null,"previous_names":[],"tags_count":4,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably%2Fably-control-go","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably%2Fably-control-go/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably%2Fably-control-go/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ably%2Fably-control-go/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ably","download_url":"https://codeload.github.com/ably/ably-control-go/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":251714939,"owners_count":21631806,"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":[],"created_at":"2024-11-17T12:10:59.108Z","updated_at":"2025-04-30T13:52:07.762Z","avatar_url":"https://github.com/ably.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# [Ably Control Go](https://ably.com/)\n\n[![Go Reference](https://pkg.go.dev/badge/github.com/ably/ably-control-go.svg)](https://pkg.go.dev/github.com/ably/ably-control-go)\n\n_[Ably](https://ably.com) is the platform that powers synchronized digital experiences in realtime. Whether attending an event in a virtual venue, receiving realtime financial information, or monitoring live car performance data – consumers simply expect realtime digital experiences as standard. Ably provides a suite of APIs to build, extend, and deliver powerful digital experiences in realtime for more than 250 million devices across 80 countries each month. Organizations like Bloomberg, HubSpot, Verizon, and Hopin depend on Ably’s platform to offload the growing complexity of business-critical realtime data synchronization at global scale. For more information, see the [Ably documentation](https://ably.com/documentation)._\n\n## Overview\n\nThis is a Go client library for the [Ably control API](https://ably.com/docs/control-api).\n\nUse the Control API to manage your applications, namespaces, keys, queues, rules, and more.\nDetailed information on using this API can be found in the Ably\n[Control API documentation](https://ably.com/docs/api/control-api). Control API is currently in Preview.\n\n## OpenAPI\n\nAn OpenAPI document for the control API can be found at https://github.com/ably/open-specs. This repo\nis not generated from the OpenAPI but instead written manually. This is because the OpenAPI generator\ndid not produce an erganomic or easy to use library.\n\n## Installation\n\n```bash\n~ $ go get -u github.com/ably/ably-go/ably\n```\n\n## Examples\n\n### Create a client\n\n```go\ntoken := os.Getenv(\"ABLY_ACCOUNT_TOKEN\")\nclient, _, err := control.NewClient(token)\nif err != nil {\n\tpanic(err)\n}\n\nfmt.Println(client)\n```\n\n### Get account and user info\n\n```go\nme, err := client.Me()\nif err != nil {\n\tpanic(err)\n}\n\nprintln(me.User.Email)\n```\n\n### List apps\n\n```go\napps, err := client.Apps()\nif err != nil {\n\tpanic(err)\n}\n\nfor _, app := range apps {\n\tfmt.Println(app.Name)\n}\n```\n\n### Create app\n\n```go\nnewapp := control.App{\n\tName:    \"Foo\",\n\tTLSOnly: true,\n}\napp, err := client.CreateApp(\u0026newapp)\nif err != nil {\n\tpanic(err)\n}\n\nfmt.Println(app.Name)\n```\n\n### Update app\n\n```go\napp.Name = \"Bar\"\napp, err := client.UpdateApp(app.ID, \u0026app)\nif err != nil {\n\tpanic(err)\n}\n```\n\n### Create key\n\n```go\nnewkey := control.NewKey{\n\tName:       \"KeyName\",\n\tCapability: map[string][]string{\"a\": {\"subscribe\"}},\n}\nkey, err := client.CreateKey(app.ID, \u0026newkey)\nif err != nil {\n\tpanic(err)\n}\n\nprintln(key.Key)\n```\n\n### Create rule\n\n```go\ntarget := \u0026control.PulsarTarget{\n\tRoutingKey:    \"aaaaa\",\n\tTopic:         \"my-tenant/my-namespace/my-topic\",\n\tServiceURL:    \"pulsar://test.com:1234\",\n\tTlsTrustCerts: []string{\"-----BEGIN CERTIFICATE-----\\naaaaa\\n-----END CERTIFICATE-----\"},\n\tAuthentication: control.PulsarAuthentication{\n\t\tAuthenticationMode: \"token\",\n\t\tToken:              \"1234\",\n\t},\n\tEnveloped: true,\n\tFormat:    control.Json,\n}\n\nnewrule := control.NewRule{\n\tStatus:      \"enabled\",\n\tRequestMode: control.Single,\n\tSource: control.Source{\n\t\tChannelFilter: \"aaa\",\n\t\tType:          control.ChannelMessage,\n\t},\n\tTarget: target,\n}\n\nrule, err := client.CreateRule(app.ID, \u0026newrule)\nif err != nil {\n\tpanic(err)\n}\n\nfmt.Println(rule.ID)\n```\n\n## Supported Versions of Go\n\nWhenever a new version of Go is released, Ably adds support for that version. The [Go Release Policy](https://golang.org/doc/devel/release#policy)\nsupports the last two major versions. This SDK follows the same policy of supporting the last two major versions of Go.\n\n## Contributing\n\nFor guidance on how to contribute to this project, see [CONTRIBUTING.md](CONTRIBUTING.md).\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fably%2Fably-control-go","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fably%2Fably-control-go","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fably%2Fably-control-go/lists"}