update vendor

This commit is contained in:
deepzz0
2017-07-11 23:50:01 +08:00
parent e1ec5cd08a
commit c18d9c0bef
107 changed files with 8347 additions and 126 deletions
+4 -4
View File
@@ -1,21 +1,21 @@
/*
qiniupkg.com/api.v7/fusion提供了七牛CDN的API功能
github.com/qiniu/api.v7/cdn 提供了七牛CDN的API功能
首先,我们要配置下 AccessKey/SecretKey,
import "qiniupkg.com/api.v7/kodo"
import "github.com/qiniu/api.v7/kodo"
kodo.SetMac("ak", "sk")
设置了AccessKey/SecretKey 就可以使用cdn的各类功能
比如我们要生成一个带时间戳防盗链的链接:
q :=url.Values{}// url.Values 请求参数
link, err := cdn.CreateTimestampAntiLeechUrl("http://www.qiniu.com", "abc/bcc/aa-s.mp4", nil, "encryptedkey", 20)
link, err := cdn.CreateTimestampAntileechURL(""http://www.qiniu.com/abc/bcc/aa-s.mp4?x=2&y=3", "encryptedkey", 20)
if err != nil {
fmt.Println(err)
}
fmt.Println(link)
又或者我们要列出CDN日志及其下载地址:
resp, err := cdn.GetLogOfDomain("2016-12-26", "x-mas.com")
resp, err := cdn.GetCdnLogList("2016-12-26", "x-mas.com")
if err != nil {
fmt.Println(err)
}