Adding method GetManagedDiskPageRangesDiff() which was implemented in .Net SDK but still missing in azure-storage-blob-go/azblob@dev

For details on GetManagedDiskPageRangesDiff() in .Net SDK see
https://docs.microsoft.com/en-us/dotnet/api/azure.storage.blobs.specialized.pageblobclient.getmanageddiskpagerangesdiff?view=azure-dotnet
This commit is contained in:
Alexey Shvechkov 2020-10-26 15:00:55 -04:00 коммит произвёл Ze Qian Zhang
Родитель 8d8fc11be7
Коммит 1313c6c94c
1 изменённых файлов: 14 добавлений и 0 удалений

Просмотреть файл

@ -141,6 +141,20 @@ func (pb PageBlobURL) GetPageRanges(ctx context.Context, offset int64, count int
nil)
}
// GetManagedDiskPageRangesDiff gets the collection of page ranges that differ between a specified snapshot and this page blob representing managed disk.
// For more information, see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges.
func (pb PageBlobURL) GetManagedDiskPageRangesDiff(ctx context.Context, offset int64, count int64, prevSnapshot *string, prevSnapshotURL *string, ac BlobAccessConditions) (*PageList, error) {
ifModifiedSince, ifUnmodifiedSince, ifMatchETag, ifNoneMatchETag := ac.ModifiedAccessConditions.pointers()
return pb.pbClient.GetPageRangesDiff(ctx, nil, nil, prevSnapshot,
prevSnapshotURL, // Get managed disk diff
httpRange{offset: offset, count: count}.pointers(),
ac.LeaseAccessConditions.pointers(),
ifModifiedSince, ifUnmodifiedSince, ifMatchETag, ifNoneMatchETag,
nil, // Blob ifTags
nil)
}
// GetPageRangesDiff gets the collection of page ranges that differ between a specified snapshot and this page blob.
// For more information, see https://docs.microsoft.com/rest/api/storageservices/get-page-ranges.
func (pb PageBlobURL) GetPageRangesDiff(ctx context.Context, offset int64, count int64, prevSnapshot string, ac BlobAccessConditions) (*PageList, error) {