Reference dependencies and define methods for the Go SDK for OpenSearch High-performance Search Edition.
Reference dependencies
module main
go 1.16
require (
github.com/alibabacloud-go/opensearch-util v1.0.1 // indirect
github.com/alibabacloud-go/tea v1.1.15
github.com/alibabacloud-go/tea-utils v1.3.9
github.com/aliyun/credentials-go v1.1.0 // indirect
)
Import the client
OpenSearch uses a proprietary product gateway. The signature algorithm works only after you reference the dependencies. For more information, see Go client examples. Copy the client code into your project and name the file client.go.
The project paths are as follows:
go.mod path: src/go.mod
client.go path: src/client/client.go