Skip to content

Commit

Permalink
go: update lib version to v3 (#444)
Browse files Browse the repository at this point in the history
* go: update lib version to v3

Signed-off-by: Jakob Hahn <[email protected]>

* replace module version with v3 in all files

Signed-off-by: Jakob Hahn <[email protected]>

* Update changelog

Signed-off-by: Jakob Hahn <[email protected]>

---------

Signed-off-by: Jakob Hahn <[email protected]>
  • Loading branch information
Jakob3xD authored Dec 11, 2023
1 parent 2357c4d commit 8d09ba8
Show file tree
Hide file tree
Showing 231 changed files with 305 additions and 304 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,7 @@ Inspired from [Keep a Changelog](https://keepachangelog.com/en/1.0.0/)
- guids: updated to work for the new opensearchapi ([#421](https://github.com/opensearch-project/opensearch-go/pull/421))
- Test adjusted to new opensearchapi functions and structs ([#421](https://github.com/opensearch-project/opensearch-go/pull/421))
- Change codecov to comment code coverage to each PR ([#410](https://github.com/opensearch-project/opensearch-go/pull/410))
- Change module version from v2 to v3 ([#444](https://github.com/opensearch-project/opensearch-go/pull/444))

### Deprecated

Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
[![Go Reference](https://pkg.go.dev/badge/github.com/opensearch-project/opensearch-go.svg)](https://pkg.go.dev/github.com/opensearch-project/opensearch-go/v2) [![Build](https://github.com/opensearch-project/opensearch-go/actions/workflows/lint.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/lint.yml) [![Unit](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-unit.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-unit.yml) [![Integration](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-integration.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-integration.yml) [![codecov](https://codecov.io/gh/opensearch-project/opensearch-go/branch/main/graph/badge.svg?token=MI9g3KYHVx)](https://codecov.io/gh/opensearch-project/opensearch-go) [![Chat](https://img.shields.io/badge/chat-on%20forums-blue)](https://discuss.opendistrocommunity.dev/c/clients/) ![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success)
[![Go Reference](https://pkg.go.dev/badge/github.com/opensearch-project/opensearch-go.svg)](https://pkg.go.dev/github.com/opensearch-project/opensearch-go/v3) [![Build](https://github.com/opensearch-project/opensearch-go/actions/workflows/lint.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/lint.yml) [![Unit](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-unit.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-unit.yml) [![Integration](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-integration.yml/badge.svg)](https://github.com/opensearch-project/opensearch-go/actions/workflows/test-integration.yml) [![codecov](https://codecov.io/gh/opensearch-project/opensearch-go/branch/main/graph/badge.svg?token=MI9g3KYHVx)](https://codecov.io/gh/opensearch-project/opensearch-go) [![Chat](https://img.shields.io/badge/chat-on%20forums-blue)](https://discuss.opendistrocommunity.dev/c/clients/) ![PRs welcome!](https://img.shields.io/badge/PRs-welcome!-success)

![OpenSearch logo](OpenSearch.svg)

Expand All @@ -20,7 +20,7 @@ OpenSearch Go Client
- [Developer Guide](DEVELOPER_GUIDE.md)
- [User Guide](USER_GUIDE.md)
- [Documentation](https://opensearch.org/docs/latest/clients/go/)
- [API Documentation](https://pkg.go.dev/github.com/opensearch-project/opensearch-go/v2)
- [API Documentation](https://pkg.go.dev/github.com/opensearch-project/opensearch-go/v3)
- Need help? Try [Forums](https://discuss.opendistrocommunity.dev/c/clients/)
- [Project Principles](https://opensearch.org/#principles)
- [Contributing to OpenSearch](CONTRIBUTING.md)
Expand Down
2 changes: 1 addition & 1 deletion RELEASING.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,5 +37,5 @@ The release process is standard across repositories in this org and is run by a
2. Add a comparison link to the new version at the bottom of the [CHANGELOG](CHANGELOG.md).
3. Adjust the internal client version in the [internal/version/version.go](internal/version/version.go) file.
4. Create a PR with the changes and merge it into main.
5. Create a tag, e.g. `v2.1.0`, and push it to the GitHub repo. This makes the new version available on https://pkg.go.dev/github.com/opensearch-project/opensearch-go/v2.
5. Create a tag, e.g. `v3.0.1`, and push it to the GitHub repo. This makes the new version available on https://pkg.go.dev/github.com/opensearch-project/opensearch-go/v3.
6. Create a new `Unreleased` section in the [CHANGELOG](CHANGELOG.md) and merge it into main.
18 changes: 9 additions & 9 deletions USER_GUIDE.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,9 +23,9 @@ import (
"os"
"strings"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v2/opensearchutil"
"github.com/opensearch-project/opensearch-go/v3"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchutil"
)

const IndexName = "go-test-index1"
Expand Down Expand Up @@ -219,10 +219,10 @@ import (
"os"

"github.com/aws/aws-sdk-go/aws/session"
requestsigner "github.com/opensearch-project/opensearch-go/v2/signer/aws"
requestsigner "github.com/opensearch-project/opensearch-go/v3/signer/aws"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

const IndexName = "go-test-index1"
Expand Down Expand Up @@ -288,9 +288,9 @@ import (
"github.com/aws/aws-sdk-go-v2/aws"
"github.com/aws/aws-sdk-go-v2/config"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
requestsigner "github.com/opensearch-project/opensearch-go/v2/signer/awsv2"
"github.com/opensearch-project/opensearch-go/v3"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
requestsigner "github.com/opensearch-project/opensearch-go/v3/signer/awsv2"
)

const endpoint = "" // e.g. https://opensearch-domain.region.com or Amazon OpenSearch Serverless endpoint
Expand Down
2 changes: 1 addition & 1 deletion _samples/advanced_index_actions.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"os"
"strings"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _samples/bulk.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"os"
"strings"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _samples/data_stream.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"os"
"strings"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _samples/document_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"os"
"strings"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _samples/index_lifecycle.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"os"
"strings"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion _samples/json.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"os"
"strings"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

const IndexName = "go-test-index1"
Expand Down
2 changes: 1 addition & 1 deletion _samples/search.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@ import (
"strings"
"time"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
module github.com/opensearch-project/opensearch-go/v2
module github.com/opensearch-project/opensearch-go/v3

go 1.20

Expand Down
2 changes: 1 addition & 1 deletion guides/advanced_index_actions.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"os"
"strings"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion guides/bulk.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"os"
"strings"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion guides/data_streams.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"os"
"strings"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion guides/document_lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import (
"os"
"strings"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion guides/index_lifecycle.md
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ import (
"os"
"strings"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func main() {
Expand Down
4 changes: 2 additions & 2 deletions guides/index_template.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,8 +17,8 @@ import (
"os"
"strings"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion guides/json.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ import (
"os"
"strings"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func main() {
Expand Down
2 changes: 1 addition & 1 deletion guides/search.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ import (
"strconv"
"strings"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func main() {
Expand Down
6 changes: 3 additions & 3 deletions opensearch.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,9 +41,9 @@ import (
"strings"
"time"

"github.com/opensearch-project/opensearch-go/v2/internal/version"
"github.com/opensearch-project/opensearch-go/v2/opensearchtransport"
"github.com/opensearch-project/opensearch-go/v2/signer"
"github.com/opensearch-project/opensearch-go/v3/internal/version"
"github.com/opensearch-project/opensearch-go/v3/opensearchtransport"
"github.com/opensearch-project/opensearch-go/v3/signer"
)

const (
Expand Down
4 changes: 2 additions & 2 deletions opensearch_benchmark_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,8 @@ import (
"strings"
"testing"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

type FakeTransport struct {
Expand Down
6 changes: 3 additions & 3 deletions opensearch_example_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,9 @@ import (
"os"
"time"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v2/opensearchtransport"
"github.com/opensearch-project/opensearch-go/v3"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchtransport"
)

func init() {
Expand Down
6 changes: 3 additions & 3 deletions opensearch_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -40,9 +40,9 @@ import (
"testing"
"time"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v2/opensearchtransport"
"github.com/opensearch-project/opensearch-go/v3"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3/opensearchtransport"
)

func TestClientTransport(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion opensearch_internal_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ import (
"strings"
"testing"

"github.com/opensearch-project/opensearch-go/v2/opensearchtransport"
"github.com/opensearch-project/opensearch-go/v3/opensearchtransport"
)

var called bool
Expand Down
4 changes: 2 additions & 2 deletions opensearch_secure_integration_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,8 +32,8 @@ import (

"github.com/stretchr/testify/assert"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
"github.com/opensearch-project/opensearch-go/v3"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
)

func getSecuredClient() (*opensearchapi.Client, error) {
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ import (
"io"
"net/http"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v3"
)

// Aliases executes an /_aliases request with the required AliasesReq
Expand Down
4 changes: 2 additions & 2 deletions opensearchapi/api_aliases_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,8 @@ import (

"github.com/stretchr/testify/require"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
osapitest "github.com/opensearch-project/opensearch-go/v2/opensearchapi/internal/test"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
osapitest "github.com/opensearch-project/opensearch-go/v3/opensearchapi/internal/test"
)

func TestAliases(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_bulk.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"net/http"
"strings"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v3"
)

// Bulk executes a /_bulk request with the needed BulkReq
Expand Down
4 changes: 2 additions & 2 deletions opensearchapi/api_bulk_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,8 +16,8 @@ import (
"github.com/stretchr/testify/assert"
"github.com/stretchr/testify/require"

"github.com/opensearch-project/opensearch-go/v2/opensearchapi"
osapitest "github.com/opensearch-project/opensearch-go/v2/opensearchapi/internal/test"
"github.com/opensearch-project/opensearch-go/v3/opensearchapi"
osapitest "github.com/opensearch-project/opensearch-go/v3/opensearchapi/internal/test"
)

func TestBulkClient(t *testing.T) {
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-aliases.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"net/http"
"strings"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v3"
)

// CatAliasesReq represent possible options for the /_cat/aliases request
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-allocation.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"net/http"
"strings"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v3"
)

// CatAllocationReq represent possible options for the /_cat/allocation request
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-cluster_manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package opensearchapi
import (
"net/http"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v3"
)

// CatClusterManagerReq represent possible options for the /_cat/cluster_manager request
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-count.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"net/http"
"strings"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v3"
)

// CatCountReq represent possible options for the /_cat/count request
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-fielddata.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"net/http"
"strings"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v3"
)

// CatFieldDataReq represent possible options for the /_cat/fielddata request
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-health.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package opensearchapi
import (
"net/http"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v3"
)

// CatHealthReq represent possible options for the /_cat/health request
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-indices.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
"net/http"
"strings"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v3"
)

// CatIndicesReq represent possible options for the /_cat/indices request
Expand Down
2 changes: 1 addition & 1 deletion opensearchapi/api_cat-master.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ package opensearchapi
import (
"net/http"

"github.com/opensearch-project/opensearch-go/v2"
"github.com/opensearch-project/opensearch-go/v3"
)

// CatMasterReq represent possible options for the /_cat/master request
Expand Down
Loading

0 comments on commit 8d09ba8

Please sign in to comment.