https://github.com/clever/atlas-api-client
Go client for MongoDB Atlas
https://github.com/clever/atlas-api-client
Last synced: about 1 year ago
JSON representation
Go client for MongoDB Atlas
- Host: GitHub
- URL: https://github.com/clever/atlas-api-client
- Owner: Clever
- Created: 2018-07-02T23:43:47.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2024-09-23T18:35:01.000Z (almost 2 years ago)
- Last Synced: 2025-06-12T06:07:16.196Z (about 1 year ago)
- Language: Go
- Size: 202 KB
- Stars: 1
- Watchers: 43
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# atlas-api-client [](https://godoc.org/github.com/Clever/atlas-api-client/gen-go/client)
With MongoDB's release of [go-client-mongodb-atlas](https://github.com/mongodb/go-client-mongodb-atlas), new repos should opt to use the official client instead. This repo is used for those that have not migrated over.
Go and JavaScript clients for MongoDB Atlas.
Owned by eng-infra.
## Usage
``` go
package main
import (
"context"
"encoding/json"
"fmt"
"log"
"github.com/Clever/atlas-api-client/gen-go/client"
)
func main() {
username := "foo@foo.com"
password := "password"
url := "https://cloud.mongodb.com"
atlasAPI := client.New(atlasUsername, password, url)
ctx := context.Background()
clusters, err := atlasAPI.GetClusters(ctx, "groupID")
// ...
}
```
- Run `make generate` to generate the code.
## Developing
- Update swagger.yml with your endpoints. See the [Swagger spec](http://swagger.io/specification/) for additional details on defining your swagger file.
- Run `make generate` to generate the code.