cdn

package
v1.0.99 Latest Latest
Warning

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

Go to latest
Published: May 11, 2023 License: Apache-2.0 Imports: 6 Imported by: 0

README

CDN接口调用示例

前置准备

服务开通

请确保您已开通了CDN服务。您可前往火山引擎控制台,在左侧菜单中选择或在顶部搜索栏中搜索CDN服务,进入服务控制台内完成开通流程。

获取安全凭证

Access Key(访问密钥)是访问火山引擎服务的安全凭证,包含Access Key ID(简称为AK)和Secret Access Key(简称为SK)两部分。您可登录火山引擎控制台,前往“访问控制”的“访问密钥”中创建及管理您的Access Key。更多信息可参考访问密钥帮助文档

环境检查

Go版本需要不低于1.13.1。

运行方式

  • 设置AK/SK
// init.go
ak              = "Your AK"
sk              = "Your SK"
  • 设置通用参数

// init.go
operateDomain   = "Your domain"
exampleDomain   = "Your domain"
  • 编写测试用例: cdn_test.go
package cdn

import (
	"testing"
)

func TestCdn(t *testing.T) {
	// 调用查询域名列表接口
	ListCdnDomains(t)
}

  • 执行测试用例
go test -v cdn_test.go init.go list_cdn_domains.go

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	DefaultInstance = cdn.DefaultInstance
)

Functions

func AddCdnCertificate

func AddCdnCertificate(t *testing.T)

func AddCdnDomain

func AddCdnDomain(t *testing.T)

func AddResourceTags

func AddResourceTags(t *testing.T)

func BatchDeployCert

func BatchDeployCert(t *testing.T)

func DeleteCdnDomain

func DeleteCdnDomain(t *testing.T)

func DeleteResourceTags

func DeleteResourceTags(t *testing.T)

func DescribeAccountingData

func DescribeAccountingData(t *testing.T)

func DescribeAccountingSummary

func DescribeAccountingSummary(t *testing.T)

func DescribeCdnAccessLog

func DescribeCdnAccessLog(t *testing.T)

func DescribeCdnConfig

func DescribeCdnConfig(t *testing.T)

func DescribeCdnData

func DescribeCdnData(t *testing.T)

func DescribeCdnDataDetail

func DescribeCdnDataDetail(t *testing.T)

func DescribeCdnOriginData

func DescribeCdnOriginData(t *testing.T)

func DescribeCdnRegionAndIsp

func DescribeCdnRegionAndIsp(t *testing.T)

func DescribeCdnService

func DescribeCdnService(t *testing.T)

func DescribeCdnUpperIp

func DescribeCdnUpperIp(t *testing.T)

func DescribeCertConfig

func DescribeCertConfig(t *testing.T)

func DescribeContentBlockTasks

func DescribeContentBlockTasks(t *testing.T)

func DescribeContentQuota

func DescribeContentQuota(t *testing.T)

func DescribeContentTasks

func DescribeContentTasks(t *testing.T)

func DescribeDistrictIspData

func DescribeDistrictIspData(t *testing.T)

func DescribeEdgeNrtDataSummary

func DescribeEdgeNrtDataSummary(t *testing.T)

func DescribeEdgeStatisticalData

func DescribeEdgeStatisticalData(t *testing.T)

func DescribeEdgeTopNrtData

func DescribeEdgeTopNrtData(t *testing.T)

func DescribeEdgeTopStatisticalData

func DescribeEdgeTopStatisticalData(t *testing.T)

func DescribeEdgeTopStatusCode

func DescribeEdgeTopStatusCode(t *testing.T)

func DescribeIPInfo

func DescribeIPInfo(t *testing.T)

func DescribeOriginNrtDataSummary

func DescribeOriginNrtDataSummary(t *testing.T)

func DescribeOriginTopNrtData

func DescribeOriginTopNrtData(t *testing.T)

func DescribeOriginTopStatusCode

func DescribeOriginTopStatusCode(t *testing.T)

func ListCdnCertInfo

func ListCdnCertInfo(t *testing.T)

func ListCdnDomains

func ListCdnDomains(t *testing.T)

func ListCertInfo

func ListCertInfo(t *testing.T)

func ListResourceTags

func ListResourceTags(t *testing.T)

func StartCdnDomain

func StartCdnDomain(t *testing.T)

func StopCdnDomain

func StopCdnDomain(t *testing.T)

func SubmitBlockTask

func SubmitBlockTask(t *testing.T)

func SubmitPreloadTask

func SubmitPreloadTask(t *testing.T)

func SubmitRefreshTask

func SubmitRefreshTask(t *testing.T)

func SubmitUnblockTask

func SubmitUnblockTask(t *testing.T)

func UpdateCdnConfig

func UpdateCdnConfig(t *testing.T)

func UpdateResourceTags

func UpdateResourceTags(t *testing.T)

Types

This section is empty.

Jump to

Keyboard shortcuts

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