{"id":14956600,"url":"https://github.com/mongodb/go-client-mongodb-ops-manager","last_synced_at":"2025-04-23T01:22:23.249Z","repository":{"id":37461030,"uuid":"243489314","full_name":"mongodb/go-client-mongodb-ops-manager","owner":"mongodb","description":"An HTTP client for Ops Manager and Cloud Manager Public API endpoints.","archived":false,"fork":false,"pushed_at":"2025-04-17T14:06:30.000Z","size":875,"stargazers_count":17,"open_issues_count":1,"forks_count":16,"subscribers_count":18,"default_branch":"master","last_synced_at":"2025-04-18T04:51:39.458Z","etag":null,"topics":["golang","hacktoberfest","mongodb","mongodb-cloud-manager","mongodb-ops-manager"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/go.mongodb.org/ops-manager","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/mongodb.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":"CONTRIBUTING.md","funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","threat_model":null,"audit":null,"citation":null,"codeowners":".github/CODEOWNERS","security":"SECURITY.md","support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2020-02-27T10:12:25.000Z","updated_at":"2025-04-17T14:05:01.000Z","dependencies_parsed_at":"2023-10-17T12:06:06.809Z","dependency_job_id":"fab672f9-0da7-466d-bed6-223f29bc3185","html_url":"https://github.com/mongodb/go-client-mongodb-ops-manager","commit_stats":{"total_commits":365,"total_committers":19,"mean_commits":"19.210526315789473","dds":0.5013698630136987,"last_synced_commit":"c93a707acdb1090bdd51c05f5a5a9ba69ec6a4dc"},"previous_names":[],"tags_count":88,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fgo-client-mongodb-ops-manager","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fgo-client-mongodb-ops-manager/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fgo-client-mongodb-ops-manager/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/mongodb%2Fgo-client-mongodb-ops-manager/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/mongodb","download_url":"https://codeload.github.com/mongodb/go-client-mongodb-ops-manager/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":250349976,"owners_count":21416044,"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":["golang","hacktoberfest","mongodb","mongodb-cloud-manager","mongodb-ops-manager"],"created_at":"2024-09-24T13:13:11.643Z","updated_at":"2025-04-23T01:22:23.223Z","avatar_url":"https://github.com/mongodb.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# MongoDB Ops Manager Go Client\n\n[![Go Reference](https://pkg.go.dev/badge/go.mongodb.org/ops-manager.svg)](https://pkg.go.dev/go.mongodb.org/ops-manager)\n![CI](https://github.com/mongodb/go-client-mongodb-ops-manager/workflows/CI/badge.svg)\n[![Go Report Card](https://goreportcard.com/badge/go.mongodb.org/ops-manager)](https://goreportcard.com/report/go.mongodb.org/ops-manager)\n\nA go client for [Ops Manager](https://docs.opsmanager.mongodb.com/master/reference/api/) \nand [Cloud Manager](https://docs.cloudmanager.mongodb.com/reference/api/) API.\n\nNote that ops-manager only supports the two most recent major versions of Go.\n\n## Usage\n\n```go\nimport \"go.mongodb.org/ops-manager/opsmngr\"\n```\n\nConstruct a new Ops Manager client, then use the various services on the client to\naccess different parts of the Ops Manager API. For example:\n\n```go\nclient := opsmngr.NewClient(nil)\n```\n\nThe services of a client divide the API into logical chunks and correspond to\nthe structure of the [Ops Manager API documentation](https://docs.opsmanager.mongodb.com/v4.4/reference/api/).\n\n**NOTE:** Using the [context](https://godoc.org/context) package, one can easily\npass cancellation signals and deadlines to various services of the client for\nhandling a request. In case there is no context available, then `context.Background()`\ncan be used as a starting point.\n\n### Authentication\n\nThe ops-manager library does not directly handle authentication. Instead, when\ncreating a new client, pass an http.Client that can handle Digest Access authentication for\nyou. The easiest way to do this is using the [digest](https://github.com/mongodb-forks/digest)\nlibrary, but you can always use any other library that provides an `http.Client`.\nIf you have a private and public API token pair, you can use it with the digest library using:\n```go\nimport (\n\t\"context\"\n\t\"log\"\n\n\t\"github.com/mongodb-forks/digest\"\n\t\"go.mongodb.org/ops-manager/opsmngr\"\n)\n\nfunc main() {\n\tt := digest.NewTransport(\"your public key\", \"your private key\")\n\ttc, err := t.Client()\n\tif err != nil {\n\t\tlog.Fatalf(err.Error())\n\t}\n\n\t// Note: If no Base URL is set the client is set to work with Cloud Manager by default\n\tclientops := opsmngr.SetBaseURL(\"https://opsmanagerurl/\" + opsmngr.APIPublicV1Path)\n\tclient, err := opsmngr.New(tc, clientops)\n\tif err != nil {\n\t\tlog.Fatalf(err.Error())\n\t}\n\n\torgs, _, err := client.Organizations.List(context.Background(), nil)\n}\n```\n\nNote that when using an authenticated Client, all calls made by the client will\ninclude the specified tokens. Therefore, authenticated clients should\nalmost never be shared between different users.\n\nTo get your API Keys please refer to our docs for,\n[Ops Manager](https://docs.opsmanager.mongodb.com/current/tutorial/configure-public-api-access/),\nor [Cloud Manager](https://docs.cloudmanager.mongodb.com/tutorial/manage-programmatic-api-keys/).\n\n## Roadmap\n\nThis library is being initially developed for [mongocli](https://github.com/mongodb/mongocli),\nso API methods will likely be implemented in the order that they are\nneeded by that application.\n\n## Contributing\n\nSee our [CONTRIBUTING.md](CONTRIBUTING.md) Guide.\n\n## License\n\nMongoDB Ops Manager Go Client is released under the Apache 2.0 license. See [LICENSE](LICENSE)\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fgo-client-mongodb-ops-manager","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmongodb%2Fgo-client-mongodb-ops-manager","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmongodb%2Fgo-client-mongodb-ops-manager/lists"}