volcstack-go-sdk

module
v1.0.3 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 24, 2022 License: Apache-2.0

README

Volcstack SDK for Go

概述

  1. 火山引擎-云计算-Go语言SDK
  2. Go版本最低1.5+ 推荐是用1.12+
  3. service目录下的文件请不要修改,都是由代码生成器自动生成
  4. 建议使用go mod方式进行依赖管理
代码示例

代码示例在example目录下

package main

import (
"fmt"

"github.com/volcengine/volcstack-go-sdk/service/vpc"
"github.com/volcengine/volcstack-go-sdk/volcstack"
"github.com/volcengine/volcstack-go-sdk/volcstack/credentials"
"github.com/volcengine/volcstack-go-sdk/volcstack/session"
)

func main() {
 var (
  ak     string
  sk     string
  region string
  config *volcstack.Config
  sess   *session.Session
  client *vpc.VPC
  resp   *vpc.DescribeVpcsOutput
  err    error
 )
 ak = "your ak"
 sk = "your sk"
 region = "cn-beijing"
 config = volcstack.NewConfig().
         WithCredentials(credentials.NewStaticCredentials(ak, sk, "")).
         WithRegion(region)

 sess, _ = session.NewSession(config)
 client = vpc.New(sess)

 resp, err = client.DescribeVpcs(&vpc.DescribeVpcsInput{
	PageNumber: volcstack.Int64(1),
	PageSize:   volcstack.Int64(10),
 })

 if err != nil {
	panic(err)
 }

 fmt.Println(&resp)

 }

Directories

Path Synopsis
example
clb
eip
vpc
internal
ini
private
protocol/json/jsonutil
Package jsonutil provides JSON serialization of VOLCSTACK requests and responses.
Package jsonutil provides JSON serialization of VOLCSTACK requests and responses.
protocol/query
Package query provides serialization of VOLCSTACK volcstackquery requests, and responses.
Package query provides serialization of VOLCSTACK volcstackquery requests, and responses.
protocol/rest
Package rest provides RESTFUL serialization of VOLCSTACK requests and responses.
Package rest provides RESTFUL serialization of VOLCSTACK requests and responses.
protocol/xml/xmlutil
Package xmlutil Package xml util provides XML serialization of VOLCSTACK requests and responses.
Package xmlutil Package xml util provides XML serialization of VOLCSTACK requests and responses.
service
autoscaling
Package autoscalingiface provides an interface to enable mocking the AUTO_SCALING service client for testing your code.
Package autoscalingiface provides an interface to enable mocking the AUTO_SCALING service client for testing your code.
cen
Package ceniface provides an interface to enable mocking the CEN service client for testing your code.
Package ceniface provides an interface to enable mocking the CEN service client for testing your code.
clb
Package clbiface provides an interface to enable mocking the CLB service client for testing your code.
Package clbiface provides an interface to enable mocking the CLB service client for testing your code.
directconnect
Package directconnectiface provides an interface to enable mocking the DIRECTCONNECT service client for testing your code.
Package directconnectiface provides an interface to enable mocking the DIRECTCONNECT service client for testing your code.
ecs
Package ecsiface provides an interface to enable mocking the ECS service client for testing your code.
Package ecsiface provides an interface to enable mocking the ECS service client for testing your code.
natgateway
Package natgatewayiface provides an interface to enable mocking the NATGATEWAY service client for testing your code.
Package natgatewayiface provides an interface to enable mocking the NATGATEWAY service client for testing your code.
rdsmysql
Package rdsmysqliface provides an interface to enable mocking the RDS_MYSQL service client for testing your code.
Package rdsmysqliface provides an interface to enable mocking the RDS_MYSQL service client for testing your code.
rdsmysqlv2
Package rdsmysqlv2iface provides an interface to enable mocking the RDS_MYSQL_V2 service client for testing your code.
Package rdsmysqlv2iface provides an interface to enable mocking the RDS_MYSQL_V2 service client for testing your code.
storageebs
Package storageebsiface provides an interface to enable mocking the STORAGE_EBS service client for testing your code.
Package storageebsiface provides an interface to enable mocking the STORAGE_EBS service client for testing your code.
volcobserve
Package volcobserveiface provides an interface to enable mocking the VOLC_OBSERVE service client for testing your code.
Package volcobserveiface provides an interface to enable mocking the VOLC_OBSERVE service client for testing your code.
vpc
Package vpciface provides an interface to enable mocking the VPC service client for testing your code.
Package vpciface provides an interface to enable mocking the VPC service client for testing your code.
vpn
Package vpniface provides an interface to enable mocking the VPN service client for testing your code.
Package vpniface provides an interface to enable mocking the VPN service client for testing your code.
Package volcstack provides core functionality for making requests to Volcstack services.
Package volcstack provides core functionality for making requests to Volcstack services.
credentials
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
Package credentials provides credential retrieval and management The Credentials is the primary method of getting access to and managing credentials Values.
defaults
Package defaults is a collection of helpers to retrieve the SDK's default configuration and handlers.
Package defaults is a collection of helpers to retrieve the SDK's default configuration and handlers.
volcstackerr
Package volcstackerr represents API error interface accessors for the SDK.
Package volcstackerr represents API error interface accessors for the SDK.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL