diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml index c998878..93f2946 100644 --- a/.github/ISSUE_TEMPLATE/config.yml +++ b/.github/ISSUE_TEMPLATE/config.yml @@ -1,8 +1,8 @@ blank_issues_enabled: false contact_links: - - name: MongoDB Realm Support + - name: MongoDB Atlas App Services Support url: https://support.mongodb.com/ about: Support is provided under MongoDB support plans. Please submit support questions within the Realm UI. - - name: MongoDB Realm - url: https://www.mongodb.com/realm - about: Learn more about MongoDB Realm + - name: MongoDB MongoDB Atlas App Services + url: https://www.mongodb.com/docs/atlas/app-services/ + about: Learn more about MongoDB MongoDB Atlas App Services diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index a71dc48..a0b24f7 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -15,7 +15,7 @@ jobs: - name: Install Go uses: actions/setup-go@v5 with: - go-version: 1.18 + go-version: 1.23 - name: lint uses: golangci/golangci-lint-action@v6.5.0 with: @@ -27,8 +27,8 @@ jobs: strategy: matrix: golang: - - 1.18 - - 1.19 + - 1.23 + steps: - name: Checkout repository uses: actions/checkout@v4 diff --git a/CODEOWNERS b/CODEOWNERS new file mode 100644 index 0000000..4860798 --- /dev/null +++ b/CODEOWNERS @@ -0,0 +1,2 @@ +# Maintained by the MongoDB APIx-Integrations team +* @mongodb-labs/apix-integrations diff --git a/Makefile b/Makefile index cd1dc1f..3781d6f 100644 --- a/Makefile +++ b/Makefile @@ -1,12 +1,18 @@ # A Self-Documenting Makefile: http://marmelab.com/blog/2016/02/29/auto-documented-makefile.html SOURCE_FILES?=./... -GOLANGCI_VERSION=v1.40.1 +GOLANGCI_VERSION=v1.62.2 COVERAGE=coverage.out export PATH := ./bin:$(PATH) export GO111MODULE := on +default: build + +.PHONY: build +build: ## Compile code + go install $(SOURCE_FILES) + .PHONY: setup setup: ## Install dev tools @echo "==> Installing dependencies..." diff --git a/README.md b/README.md index 9ca162e..7f42760 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,24 @@ -# go-client-mongodb-realm +# go-client-mongodb-atlas-app-services (WIP) [![PkgGoDev](https://pkg.go.dev/badge/go.mongodb.org/realm)](https://pkg.go.dev/go.mongodb.org/realm) -A Go HTTP client for the [MongoDB Realm API](https://docs.mongodb.com/realm/admin/api/v3/). - -Note that Realm only supports the two most recent major versions of Go. +A Go HTTP client for the [MongoDB Atlas App Services Admin API](https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/). ## Usage ```go -import "go.mongodb.org/realm/realm" +import "go.mongodb.org/atlas-appservices/appservices" ``` -Construct a new Realm client, then use the various services on the client to +Construct a new App Services client, then use the various services on the client to access different parts of the Atlas API. For example: ```go -client := realm.NewClient(nil) +client := appservices.NewClient(nil) ``` The services of a client divide the API into logical chunks and correspond to the structure of the Atlas API documentation at -https://docs.mongodb.com/realm/admin/api/v3/. +https://www.mongodb.com/docs/atlas/app-services/admin/api/v3/. **NOTE:** Using the [context](https://godoc.org/context) package, one can easily pass cancellation signals and deadlines to various services of the client for @@ -33,7 +31,7 @@ Each version of the client is tagged, and the version is updated accordingly. To see the list of past versions, run `git tag`. -To release a new version, first ensure that [Version](./realm/realm.go) is updated +To release a new version, first ensure that [Version](./appservices/appservices.go) is updated (i.e., before running `git push origin vx.y.z`, verify that `Version=x.y.z` should match the tag being pushed to GitHub) ## Roadmap @@ -48,4 +46,4 @@ See our [CONTRIBUTING.md](CONTRIBUTING.md) Guide. ## License -`go-client-mongodb-realm` is released under the Apache 2.0 license. See [LICENSE](LICENSE) +`go-client-mongodb-atlas-app-services` is released under the Apache 2.0 license. See [LICENSE](LICENSE) diff --git a/realm/apps.go b/appservices/apps.go similarity index 99% rename from realm/apps.go rename to appservices/apps.go index b4ba303..0f7b18e 100644 --- a/realm/apps.go +++ b/appservices/apps.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package realm +package appservices import ( "context" diff --git a/realm/apps_test.go b/appservices/apps_test.go similarity index 98% rename from realm/apps_test.go rename to appservices/apps_test.go index 2429657..4437b58 100644 --- a/realm/apps_test.go +++ b/appservices/apps_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package realm +package appservices import ( "fmt" diff --git a/realm/realm.go b/appservices/appservices.go similarity index 99% rename from realm/realm.go rename to appservices/appservices.go index c50f76c..87ccf88 100644 --- a/realm/realm.go +++ b/appservices/appservices.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package realm // import "go.mongodb.org/realm/realm" +package appservices // import "go.mongodb.org/realm/realm" import ( "bytes" @@ -28,6 +28,7 @@ import ( "strings" "github.com/google/go-querystring/query" + "go.mongodb.org/atlas/mongodbatlas" ) diff --git a/realm/realm_test.go b/appservices/appservices_test.go similarity index 99% rename from realm/realm_test.go rename to appservices/appservices_test.go index f0f4cc8..6ae56ba 100644 --- a/realm/realm_test.go +++ b/appservices/appservices_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package realm +package appservices import ( "context" diff --git a/realm/event_triggers.go b/appservices/event_triggers.go similarity index 99% rename from realm/event_triggers.go rename to appservices/event_triggers.go index f528055..f4c2081 100644 --- a/realm/event_triggers.go +++ b/appservices/event_triggers.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package realm +package appservices import ( "context" diff --git a/realm/event_triggers_test.go b/appservices/event_triggers_test.go similarity index 99% rename from realm/event_triggers_test.go rename to appservices/event_triggers_test.go index 5415604..1b0f3b5 100644 --- a/realm/event_triggers_test.go +++ b/appservices/event_triggers_test.go @@ -12,7 +12,7 @@ // See the License for the specific language governing permissions and // limitations under the License. -package realm +package appservices import ( "encoding/json" diff --git a/go.mod b/go.mod index 9dfc55b..ebcf338 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,8 @@ -module go.mongodb.org/realm +module go.mongodb.org/atlas-appservices -go 1.18 +go 1.23 + +toolchain go1.23.1 require ( github.com/go-test/deep v1.1.1