Skip to content
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fixed Documentation
  • Loading branch information
mohsha-msft committed Mar 18, 2022
commit 8295e4a362575860870eeaae681e4225bdcd07b4
1 change: 1 addition & 0 deletions sdk/storage/azblob/highlevel.go
Original file line number Diff line number Diff line change
Expand Up @@ -547,6 +547,7 @@ func (s *syncPool) Close() {

const _1MiB = 1024 * 1024

// UploadStreamToBlockBlobOptions provides set of configurations for UploadStreamToBlockBlob operation
type UploadStreamToBlockBlobOptions struct {
// TransferManager provides a TransferManager that controls buffer allocation/reuse and
// concurrency. This overrides BufferSize and MaxBuffers if set.
Expand Down
1 change: 1 addition & 0 deletions sdk/storage/azblob/zc_append_blob_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
)

// AppendBlobClient represents a client to an Azure Storage append blob;
type AppendBlobClient struct {
BlobClient
client *appendBlobClient
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/azblob/zc_blob_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
)

// A BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, append blob, or page blob.
// BlobClient represents a URL to an Azure Storage blob; the blob may be a block blob, append blob, or page blob.
type BlobClient struct {
client *blobClient
sharedKey *SharedKeyCredential
Expand Down
2 changes: 2 additions & 0 deletions sdk/storage/azblob/zc_blob_lease_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/internal/uuid"
)

// BlobLeaseClient represents lease client on blob
type BlobLeaseClient struct {
BlobClient
leaseID *string
}

// NewBlobLeaseClient is constructor for BlobLeaseClient
func (b BlobClient) NewBlobLeaseClient(leaseID *string) (BlobLeaseClient, error) {
if leaseID == nil {
generatedUuid, err := uuid.New()
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/azblob/zc_container_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/azcore/runtime"
)

// A ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs.
// ContainerClient represents a URL to the Azure Storage container allowing you to manipulate its blobs.
type ContainerClient struct {
client *containerClient
sharedKey *SharedKeyCredential
Expand Down
2 changes: 2 additions & 0 deletions sdk/storage/azblob/zc_container_lease_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -11,11 +11,13 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/internal/uuid"
)

//ContainerLeaseClient represents lease client of container
type ContainerLeaseClient struct {
ContainerClient
leaseID *string
}

// NewContainerLeaseClient is constructor of ContainerLeaseClient
func (c ContainerClient) NewContainerLeaseClient(leaseID *string) (ContainerLeaseClient, error) {
if leaseID == nil {
generatedUuid, err := uuid.New()
Expand Down
1 change: 1 addition & 0 deletions sdk/storage/azblob/zc_page_blob_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ const (
PageBlobPageBytes = 512
)

// PageBlobClient represents a client to an Azure Storage page blob;
type PageBlobClient struct {
BlobClient
client *pageBlobClient
Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/azblob/zc_parsing_urls.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ const (
SnapshotTimeFormat = "2006-01-02T15:04:05.0000000Z07:00"
)

// A BlobURLParts object represents the components that make up an Azure Storage Container/Blob URL. You parse an
// BlobURLParts object represents the components that make up an Azure Storage Container/Blob URL. You parse an
// existing URL into its parts by calling NewBlobURLParts(). You construct a URL from parts by calling URL().
// NOTE: Changing any SAS-related field requires computing a new SAS signature.
type BlobURLParts struct {
Expand Down
6 changes: 3 additions & 3 deletions sdk/storage/azblob/zc_sas_account.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func (v AccountSASSignatureValues) Sign(sharedKeyCredential *SharedKeyCredential
return p, nil
}

// The AccountSASPermissions type simplifies creating the permissions string for an Azure Storage Account SAS.
// AccountSASPermissions type simplifies creating the permissions string for an Azure Storage Account SAS.
// Initialize an instance of this type and then call its String method to set AccountSASSignatureValues's Permissions field.
type AccountSASPermissions struct {
Read, Write, Delete, DeletePreviousVersion, List, Add, Create, Update, Process, Tag, FilterByTags bool
Expand Down Expand Up @@ -159,7 +159,7 @@ func (p *AccountSASPermissions) Parse(s string) error {
return nil
}

// The AccountSASServices type simplifies creating the services string for an Azure Storage Account SAS.
// AccountSASServices type simplifies creating the services string for an Azure Storage Account SAS.
// Initialize an instance of this type and then call its String method to set AccountSASSignatureValues's Services field.
type AccountSASServices struct {
Blob, Queue, File bool
Expand Down Expand Up @@ -199,7 +199,7 @@ func (s *AccountSASServices) Parse(str string) error {
return nil
}

// The AccountSASResourceTypes type simplifies creating the resource types string for an Azure Storage Account SAS.
// AccountSASResourceTypes type simplifies creating the resource types string for an Azure Storage Account SAS.
// Initialize an instance of this type and then call its String method to set AccountSASSignatureValues's ResourceTypes field.
type AccountSASResourceTypes struct {
Service, Container, Object bool
Expand Down
4 changes: 2 additions & 2 deletions sdk/storage/azblob/zc_sas_service.go
Original file line number Diff line number Diff line change
Expand Up @@ -194,7 +194,7 @@ func getCanonicalName(account string, containerName string, blobName string, dir
return strings.Join(elements, "")
}

// The ContainerSASPermissions type simplifies creating the permissions string for an Azure Storage container SAS.
// ContainerSASPermissions type simplifies creating the permissions string for an Azure Storage container SAS.
// Initialize an instance of this type and then call its String method to set BlobSASSignatureValues's Permissions field.
// All permissions descriptions can be found here: https://docs.microsoft.com/en-us/rest/api/storageservices/create-service-sas#permissions-for-a-directory-container-or-blob
type ContainerSASPermissions struct {
Expand Down Expand Up @@ -276,7 +276,7 @@ func (p *ContainerSASPermissions) Parse(s string) error {
return nil
}

// The BlobSASPermissions type simplifies creating the permissions string for an Azure Storage blob SAS.
// BlobSASPermissions type simplifies creating the permissions string for an Azure Storage blob SAS.
// Initialize an instance of this type and then call its String method to set BlobSASSignatureValues's Permissions field.
type BlobSASPermissions struct {
Read, Add, Create, Write, Delete, DeletePreviousVersion, Tag, List, Move, Execute, Ownership, Permissions bool
Expand Down
6 changes: 4 additions & 2 deletions sdk/storage/azblob/zc_service_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ const (
ContainerNameLogs = "$logs"
)

// A ServiceClient represents a URL to the Azure Blob Storage service allowing you to manipulate blob containers.
// ServiceClient represents a URL to the Azure Blob Storage service allowing you to manipulate blob containers.
type ServiceClient struct {
client *serviceClient
u url.URL
Expand Down Expand Up @@ -145,13 +145,14 @@ func appendToURLPath(u string, name string) string {
return uri.String()
}

// GetAccountInfo provides account level information
func (s ServiceClient) GetAccountInfo(ctx context.Context) (ServiceGetAccountInfoResponse, error) {
resp, err := s.client.GetAccountInfo(ctx, nil)

return resp, handleError(err)
}

// The ListContainers operation returns a pager of the containers under the specified account.
// ListContainers operation returns a pager of the containers under the specified account.
// Use an empty Marker to start enumeration from the beginning. Container names are returned in lexicographic order.
// For more information, see https://docs.microsoft.com/rest/api/storageservices/list-containers2.
func (s ServiceClient) ListContainers(o *ListContainersOptions) *ServiceListContainersSegmentPager {
Expand Down Expand Up @@ -216,6 +217,7 @@ func (s ServiceClient) GetStatistics(ctx context.Context) (ServiceGetStatisticsR
return resp, handleError(err)
}

// CanGetAccountSASToken checks if shared key in ServiceClient is nil
func (s ServiceClient) CanGetAccountSASToken() bool {
return s.sharedKey != nil
}
Expand Down
2 changes: 2 additions & 0 deletions sdk/storage/azblob/zc_storage_error.go
Original file line number Diff line number Diff line change
Expand Up @@ -138,13 +138,15 @@ func (e StorageError) Error() string {
// return e.ErrorNode.Error(b.String())
}

// Is checks if err can be cast as StorageError
func (e StorageError) Is(err error) bool {
_, ok := err.(StorageError)
_, ok2 := err.(*StorageError)

return ok || ok2
}

// Response returns StorageError.response
func (e StorageError) Response() *http.Response {
return e.response
}
Expand Down
3 changes: 3 additions & 0 deletions sdk/storage/azblob/zz_generated_constants.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading