Exemplo n.º 1
0
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
}
Exemplo n.º 2
0
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
}
Exemplo n.º 3
0
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
}
Exemplo n.º 4
0
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
}