Skip to content

Latest commit

 

History

7 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

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

Stars

1 star

Watchers

3 watching

Forks

Releases

Packages

Contributors

Languages