當前位置: 首頁>>代碼示例>>Golang>>正文


Golang rs.Client類代碼示例

本文整理匯總了Golang中github.com/qiniu/api/rs.Client的典型用法代碼示例。如果您正苦於以下問題:Golang Client類的具體用法?Golang Client怎麽用?Golang Client使用的例子?那麽, 這裏精選的類代碼示例或許可以為您提供幫助。


在下文中一共展示了Client類的5個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的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
}
開發者ID:joozo-gexia,項目名稱:qshell,代碼行數:8,代碼來源:rs.go

示例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
}
開發者ID:joozo-gexia,項目名稱:qshell,代碼行數:8,代碼來源:rs.go

示例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
}
開發者ID:joozo-gexia,項目名稱:qshell,代碼行數:8,代碼來源:rs.go

示例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
}
開發者ID:joozo-gexia,項目名稱:qshell,代碼行數:8,代碼來源:rs.go

示例5: qiniuDeleteImage

func qiniuDeleteImage(fileName string) error {
	var client rs.Client
	client = rs.New(nil)

	err := client.Delete(nil, models.QiniuScope, fileName)
	if err != nil {
		revel.ERROR.Println("rs.Delete failed:", err)
	}

	return err
}
開發者ID:zeuson,項目名稱:gorevel,代碼行數:11,代碼來源:application.go


注:本文中的github.com/qiniu/api/rs.Client類示例由純淨天空整理自Github/MSDocs等開源代碼及文檔管理平台,相關代碼片段篩選自各路編程大神貢獻的開源項目,源碼版權歸原作者所有,傳播和使用請參考對應項目的License;未經允許,請勿轉載。