Skip to content

morlay/goqcloud

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Tencent Cloud SDK for go

GoDoc Widget Go Report Card

Generated form Tencent Cloud API docs

How to

  • run make to generate all clients
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

About

No description or website provided.

Topics

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages