https://github.com/morlay/goqcloud
https://github.com/morlay/goqcloud
go tencentcloud-sdk
Last synced: 8 months ago
JSON representation
- Host: GitHub
- URL: https://github.com/morlay/goqcloud
- Owner: morlay
- License: mit
- Created: 2018-05-31T10:37:13.000Z (about 8 years ago)
- Default Branch: master
- Last Pushed: 2018-11-23T02:31:57.000Z (over 7 years ago)
- Last Synced: 2025-01-08T10:48:00.510Z (over 1 year ago)
- Topics: go, tencentcloud-sdk
- Language: Go
- Size: 469 KB
- Stars: 1
- Watchers: 5
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
## Tencent Cloud SDK for go
[](https://godoc.org/github.com/morlay/goqcloud)
[](https://goreportcard.com/report/github.com/morlay/goqcloud)
Generated form [Tencent Cloud API docs](https://cloud.tencent.com/document/api)
## How to
* run `make` to generate all clients
```go
package main
import (
"os"
"fmt"
"time"
"github.com/morlay/goqcloud"
"github.com/morlay/goqcloud/clients/cvm"
)
func main() {
client := goqcloud.NewClientWithCredential(
os.Getenv("TENCENTCLOUD_SECRET_ID"),
os.Getenv("TENCENTCLOUD_SECRET_KEY"),
// optional config timeout
goqcloud.ClientOptionWithTimeout(1 * time.Hour),
// log each request
goqcloud.ClientOptionWithTransports(
goqcloud.NewLogTransport(),
// or define your own transport
),
)
req := cvm.DescribeInstancesRequest{
Region: "cn-beijing",
}
resp, err := req.Invoke(client)
if err != nil {
panic(err)
}
fmt.Printf("%v", resp.InstanceSet)
}
```
## Rules
* required field will not be pointer