本文整理匯總了Golang中qiniu/api/v6/rs.Client.Batch方法的典型用法代碼示例。如果您正苦於以下問題:Golang Client.Batch方法的具體用法?Golang Client.Batch怎麽用?Golang Client.Batch使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類qiniu/api/v6/rs.Client
的用法示例。
在下文中一共展示了Client.Batch方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的Golang代碼示例。
示例1: BatchCopy
func BatchCopy(client rs.Client, entries []CopyEntryPath) (ret []BatchItemRet, err error) {
b := make([]string, len(entries))
for i, e := range entries {
b[i] = rs.URICopy(e.SrcBucket, e.SrcKey, e.DestBucket, e.DestKey)
}
err = client.Batch(nil, &ret, b)
return
}
示例2: BatchDelete
func BatchDelete(client rs.Client, entries []rs.EntryPath) (ret []BatchItemRet, err error) {
b := make([]string, len(entries))
for i, e := range entries {
b[i] = rs.URIDelete(e.Bucket, e.Key)
}
err = client.Batch(nil, &ret, b)
return
}
示例3: BatchRename
func BatchRename(client rs.Client, entries []RenameEntryPath) (ret []BatchItemRet, err error) {
b := make([]string, len(entries))
for i, e := range entries {
b[i] = rs.URIMove(e.Bucket, e.OldKey, e.Bucket, e.NewKey)
}
err = client.Batch(nil, &ret, b)
return
}
示例4: BatchChgm
func BatchChgm(client rs.Client, entries []ChgmEntryPath) (ret []BatchItemRet, err error) {
b := make([]string, len(entries))
for i, e := range entries {
b[i] = rs.URIChangeMime(e.Bucket, e.Key, e.MimeType)
}
err = client.Batch(nil, &ret, b)
return
}