| 1 |
package opensearch |
| 2 |
|
| 3 |
import "github.com/denverdino/aliyungo/common" |
| 4 |
|
| 5 |
const ( |
| 6 |
Internet = "" |
| 7 |
Intranet = "intranet." |
| 8 |
VPC = "vpc." |
| 9 |
APIVersion = "v2" |
| 10 |
) |
| 11 |
|
| 12 |
type Client struct { |
| 13 |
common.Client |
| 14 |
} |
| 15 |
|
| 16 |
tion不在公共参数里面 |
| 17 |
type OpenSearchArgs struct { |
| 18 |
Action string `ArgName:"action"` |
| 19 |
} |
| 20 |
|
| 21 |
func NewClient(networkType string, region common.Region, accessKeyId, accessKeySecret string) *Client { |
| 22 |
client := new(Client) |
| 23 |
client.Init("http://"+networkType+"opensearch-"+string(region)+".aliyuncs.com", APIVersion, accessKeyId, accessKeySecret) |
| 24 |
return client |
| 25 |
} |