byteplus-go-sdk-v2

module
v1.0.32 Latest Latest
Warning

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

Go to latest
Published: Oct 13, 2025 License: Apache-2.0

README

English | 简体中文

Byteplus SDK for Go

Overview

  • SDK for Go
  • Go =>1.14+; Go =>1.18+ if using the ModelArk service (service/arkruntime)
  • please don't modify any source code under path /service, which is fully machine generated
  • recommend using Go modules - built-in feature dependency versioning and dependency management
Sample:
package main

import (
	"fmt"

	"github.com/byteplus-sdk/byteplus-go-sdk-v2/byteplus"
	"github.com/byteplus-sdk/byteplus-go-sdk-v2/byteplus/credentials"
	"github.com/byteplus-sdk/byteplus-go-sdk-v2/byteplus/session"
	"github.com/byteplus-sdk/byteplus-go-sdk-v2/service/vpc"
)

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

	sess, err = session.NewSession(config)
	if err != nil {
		panic(err)
	}

	client = vpc.New(sess)

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

	if err != nil {
		panic(err)
	}

	fmt.Println(&resp)
}

For more code examples, please refer to: SDK Integration Document

Directories

Path Synopsis
Package byteplus provides core functionality for making requests to byteplus services.
Package byteplus provides core functionality for making requests to byteplus services.
bytepluserr
Package bytepluserr represents API error interface accessors for the SDK.
Package bytepluserr represents API error interface accessors for the SDK.
credentials
Package credentials provides credential retrieval and management
Package credentials provides credential retrieval and management
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.
internal
ini
private
protocol/json/jsonutil
Package jsonutil provides JSON serialization of BYTEPLUS requests and responses.
Package jsonutil provides JSON serialization of BYTEPLUS requests and responses.
protocol/query
Package query provides serialization of BYTEPLUS byteplusquery requests, and responses.
Package query provides serialization of BYTEPLUS byteplusquery requests, and responses.
protocol/rest
Package rest provides RESTFUL serialization of BYTEPLUS requests and responses.
Package rest provides RESTFUL serialization of BYTEPLUS requests and responses.
protocol/xml/xmlutil
Package xmlutil Package xml util provides XML serialization of BYTEPLUS requests and responses.
Package xmlutil Package xml util provides XML serialization of BYTEPLUS requests and responses.
service
alb
Package albiface provides an interface to enable mocking the ALB service client for testing your code.
Package albiface provides an interface to enable mocking the ALB service client for testing your code.
apig
Package apigiface provides an interface to enable mocking the APIG service client for testing your code.
Package apigiface provides an interface to enable mocking the APIG service client for testing your code.
apig20221112
Package apig20221112iface provides an interface to enable mocking the APIG20221112 service client for testing your code.
Package apig20221112iface provides an interface to enable mocking the APIG20221112 service client for testing your code.
ark
Package arkiface provides an interface to enable mocking the ARK service client for testing your code.
Package arkiface provides an interface to enable mocking the ARK service client for testing your code.
arkruntime/model/responses
Package responses provides the responses model of the ark runtime service.
Package responses provides the responses model of the ark runtime 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.
billing
Package billingiface provides an interface to enable mocking the BILLING service client for testing your code.
Package billingiface provides an interface to enable mocking the BILLING service client for testing your code.
cloudmonitor
Package cloudmonitoriface provides an interface to enable mocking the CLOUDMONITOR service client for testing your code.
Package cloudmonitoriface provides an interface to enable mocking the CLOUDMONITOR service client for testing your code.
cp
Package cpiface provides an interface to enable mocking the CP service client for testing your code.
Package cpiface provides an interface to enable mocking the CP service client for testing your code.
cr
Package criface provides an interface to enable mocking the CR service client for testing your code.
Package criface provides an interface to enable mocking the CR 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.
dms
Package dmsiface provides an interface to enable mocking the DMS service client for testing your code.
Package dmsiface provides an interface to enable mocking the DMS service client for testing your code.
ecopartner
Package ecopartneriface provides an interface to enable mocking the ECO_PARTNER service client for testing your code.
Package ecopartneriface provides an interface to enable mocking the ECO_PARTNER 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.
escloud
Package escloudiface provides an interface to enable mocking the ESCLOUD service client for testing your code.
Package escloudiface provides an interface to enable mocking the ESCLOUD service client for testing your code.
filenas
Package filenasiface provides an interface to enable mocking the FILENAS service client for testing your code.
Package filenasiface provides an interface to enable mocking the FILENAS service client for testing your code.
iam
Package iamiface provides an interface to enable mocking the IAM service client for testing your code.
Package iamiface provides an interface to enable mocking the IAM service client for testing your code.
iam20210801
Package iam20210801iface provides an interface to enable mocking the IAM20210801 service client for testing your code.
Package iam20210801iface provides an interface to enable mocking the IAM20210801 service client for testing your code.
kafka
Package kafkaiface provides an interface to enable mocking the KAFKA service client for testing your code.
Package kafkaiface provides an interface to enable mocking the KAFKA service client for testing your code.
kms
Package kmsiface provides an interface to enable mocking the KMS service client for testing your code.
Package kmsiface provides an interface to enable mocking the KMS service client for testing your code.
rdsmssql
Package rdsmssqliface provides an interface to enable mocking the RDS_MSSQL service client for testing your code.
Package rdsmssqliface provides an interface to enable mocking the RDS_MSSQL 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.
rdspostgresql
Package rdspostgresqliface provides an interface to enable mocking the RDS_POSTGRESQL service client for testing your code.
Package rdspostgresqliface provides an interface to enable mocking the RDS_POSTGRESQL service client for testing your code.
redis
Package redisiface provides an interface to enable mocking the REDIS service client for testing your code.
Package redisiface provides an interface to enable mocking the REDIS service client for testing your code.
smc
Package smciface provides an interface to enable mocking the SMC service client for testing your code.
Package smciface provides an interface to enable mocking the SMC 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.
transitrouter
Package transitrouteriface provides an interface to enable mocking the TRANSITROUTER service client for testing your code.
Package transitrouteriface provides an interface to enable mocking the TRANSITROUTER service client for testing your code.
vedbm
Package vedbmiface provides an interface to enable mocking the VEDBM service client for testing your code.
Package vedbmiface provides an interface to enable mocking the VEDBM service client for testing your code.
vefaas
Package vefaasiface provides an interface to enable mocking the VEFAAS service client for testing your code.
Package vefaasiface provides an interface to enable mocking the VEFAAS service client for testing your code.
vke
Package vkeiface provides an interface to enable mocking the VKE service client for testing your code.
Package vkeiface provides an interface to enable mocking the VKE service client for testing your code.
vmp
Package vmpiface provides an interface to enable mocking the VMP service client for testing your code.
Package vmpiface provides an interface to enable mocking the VMP 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.

Jump to

Keyboard shortcuts

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