Ctyun golang sdk

# Install

Use go get to retrieve the SDK to add it to your project's Go module dependencies.

```shell
go get github.com/ctyunsdk/ctyun-go-sdk
```

To update the SDK use go get -u to retrieve the latest version of the SDK.

```shell
go get -u github.com/ctyunsdk/ctyun-go-sdk
```

# Example

you can see sdk example in [example](example) directory.

# Usage

```golang
package main

import (
	"fmt"
	
	"github.com/ctyunsdk/ctyun-go-sdk/ctyun"
	"github.com/ctyunsdk/ctyun-go-sdk/service/vpc"
)

func main() {
	client := ctyun.NewProdClient()
	client.RegisterEndpoint(ctyun.Endpoint{Name: "ctvpc", Url: "https://ctvpc-global.ctapi.ctyun.cn"}
	ak := ""
	sk := ""
	vpcApi := vpc.NewVpcApi(ak, sk, client)

	ctx := context.TODO()
	resp, err := vpcApi.CreateVpc(ctx, vpc.CreateVPCParam{
		ClientToken:       "xxxxxxxxxxxxxx",
		RegionID:          "bb9fdb42056f11eda1610242ac110002",
		Name:              "test-vpc",
		ProjectID:         nil,
		Description:       nil,
		Cidr:              "192.168.1.0/24",
		EnableIpv6:        nil,
		Ipv6SegmentPoolId: nil,
		AddressPoolType:   nil,
		Ipv6Cidr:          nil,
		Ipv6Isp:           nil,
	})
	
	if err != nil {
		panic(err)
	}
	
	fmt.Printf("create resp %+v\n", resp)
}

```