Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[AzDatalake] Filesystem Client Implementation + Test Framework #21067

Merged
merged 63 commits into from
Jul 4, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
63 commits
Select commit Hold shift + click to select a range
e8167a2
Enable gocritic during linting (#20715)
jhendrixMSFT Apr 28, 2023
86627ae
Cosmos DB: Enable merge support (#20716)
ealsur Apr 28, 2023
8ac8c6d
[azservicebus, azeventhubs] Stress test and logging improvement (#20710)
richardpark-msft May 1, 2023
9111616
update proxy version (#20712)
azure-sdk May 1, 2023
d6bf190
Return an error when you try to send a message that's too large. (#20…
richardpark-msft May 1, 2023
e2693bd
Changes in test that is failing in pipeline (#20693)
siminsavani-msft May 2, 2023
03f0ac3
[azservicebus, azeventhubs] Treat 'entity full' as a fatal error (#20…
richardpark-msft May 2, 2023
838842d
[azservicebus/azeventhubs] Redirect stderr and stdout to tee (#20726)
richardpark-msft May 3, 2023
20b4dd8
Update changelog with latest features (#20730)
jhendrixMSFT May 3, 2023
745d967
pass along the artifact name so we can override it later (#20732)
azure-sdk May 3, 2023
6dfd0cb
[azeventhubs] Fixing checkpoint store race condition (#20727)
richardpark-msft May 3, 2023
ed7f3c7
Fix azidentity troubleshooting guide link (#20736)
chlowell May 3, 2023
b2cddab
[Release] sdk/resourcemanager/paloaltonetworksngfw/armpanngfw/0.1.0 (…
Alancere May 4, 2023
2a8d96d
add sdk/resourcemanager/postgresql/armpostgresql live test (#20685)
Alancere May 4, 2023
0d22aed
add sdk/resourcemanager/eventhub/armeventhub live test (#20686)
Alancere May 4, 2023
5fa7df4
add sdk/resourcemanager/compute/armcompute live test (#20048)
Alancere May 4, 2023
c005ed6
sdk/resourcemanager/network/armnetwork live test (#20331)
Alancere May 4, 2023
36f766d
add sdk/resourcemanager/cosmos/armcosmos live test (#20705)
Alancere May 4, 2023
9c9d62a
Increment package version after release of azcore (#20740)
azure-sdk May 4, 2023
8bc3450
[azeventhubs] Improperly resetting etag in the checkpoint store (#20737)
richardpark-msft May 4, 2023
e1a6152
Eng workflows sync and branch cleanup additions (#20743)
azure-sdk May 4, 2023
04b463d
[azeventhubs] Latest start position can also be inclusive (ie, get th…
richardpark-msft May 4, 2023
8849196
Update GitHubEventProcessor version and remove pull_request_review pr…
azure-sdk May 5, 2023
27f5ee0
Rename DisableAuthorityValidationAndInstanceDiscovery (#20746)
chlowell May 5, 2023
2eec707
fix (#20707)
Alancere May 6, 2023
22db2d4
AzFile (#20739)
souravgupta-msft May 8, 2023
0cbfd88
azfile: Fixing connection string parsing logic (#20798)
souravgupta-msft May 8, 2023
d54fb08
[azadmin] fix flaky test (#20758)
gracewilcox May 8, 2023
ad8ebd9
Prepare azidentity v1.3.0 for release (#20756)
chlowell May 8, 2023
e2a6f70
Fix broken podman link (#20801)
azure-sdk May 8, 2023
a59d912
[azquery] update doc comments (#20755)
gracewilcox May 8, 2023
bd3b467
Fixed contribution section (#20752)
bobtabor-msft May 8, 2023
132a01a
[azeventhubs,azservicebus] Some API cleanup, renames (#20754)
richardpark-msft May 8, 2023
8db51ca
Add supporting features to enable distributed tracing (#20301) (#20708)
jhendrixMSFT May 9, 2023
4a66b4f
Restore ARM CAE support for azcore beta (#20657)
chlowell May 9, 2023
7d4a3cb
Upgrade to stable azcore (#20808)
chlowell May 9, 2023
068c3be
Increment package version after release of data/azcosmos (#20807)
azure-sdk May 9, 2023
8e0f66e
Updating changelog (#20810)
souravgupta-msft May 9, 2023
ce926c4
Add fake package to azcore (#20711)
jhendrixMSFT May 9, 2023
1a145c5
Updating CHANGELOG.md (#20809)
siminsavani-msft May 9, 2023
90dfc5c
changelog (#20811)
tasherif-msft May 9, 2023
c7eda59
Increment package version after release of storage/azfile (#20813)
azure-sdk May 9, 2023
7fac0b5
Update changelog (azblob) (#20815)
siminsavani-msft May 9, 2023
498a2ef
[azquery] migration guide (#20742)
gracewilcox May 9, 2023
ccb967e
Increment package version after release of monitor/azquery (#20820)
azure-sdk May 9, 2023
f4e6a22
[keyvault] prep for release (#20819)
gracewilcox May 10, 2023
8fd8eda
Merge branch 'main' into feature/azdatalake
tasherif-msft May 11, 2023
c94fa00
Merge remote-tracking branch 'upstream/feature/azdatalake' into featu…
tasherif-msft May 11, 2023
fc0b2b5
Merge remote-tracking branch 'upstream/feature/azdatalake' into featu…
tasherif-msft Jun 12, 2023
6fb1694
Merge remote-tracking branch 'upstream/feature/azdatalake' into featu…
tasherif-msft Jun 19, 2023
4f7fe43
Merge remote-tracking branch 'upstream/feature/azdatalake' into featu…
tasherif-msft Jun 26, 2023
2b127ca
added new client methods
tasherif-msft Jun 27, 2023
4a76e11
moved access conditions and wrote first test
tasherif-msft Jun 27, 2023
a464998
added more tests
tasherif-msft Jun 28, 2023
9d02de3
added path listing
tasherif-msft Jun 28, 2023
cda3bcf
list deleted paths
tasherif-msft Jun 28, 2023
e552ebf
fixed formatter and added more tests
tasherif-msft Jun 29, 2023
98fc899
added more tests
tasherif-msft Jun 29, 2023
9e02ba2
marker fix
tasherif-msft Jun 29, 2023
6d8c039
log
tasherif-msft Jun 29, 2023
cdb95ab
fixed constructor validation
tasherif-msft Jun 29, 2023
a60f50c
comment
tasherif-msft Jun 29, 2023
6011e99
assets update:
tasherif-msft Jun 29, 2023
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
6 changes: 6 additions & 0 deletions sdk/storage/azdatalake/assets.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
{
"AssetsRepo": "Azure/azure-sdk-assets",
"AssetsRepoPrefixPath": "go",
"TagPrefix": "go/storage/azdatalake",
"Tag": "go/storage/azdatalake_e05ec93d89"
}
31 changes: 22 additions & 9 deletions sdk/storage/azdatalake/common.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,17 +7,30 @@
package azdatalake

import (
"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/internal/generated"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/internal/exported"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azdatalake/sas"
)

// AccessConditions identifies container-specific access conditions which you optionally set.
type AccessConditions struct {
ModifiedAccessConditions *ModifiedAccessConditions
LeaseAccessConditions *LeaseAccessConditions
// SharedKeyCredential contains an account's name and its primary or secondary key.
type SharedKeyCredential = exported.SharedKeyCredential

// NewSharedKeyCredential creates an immutable SharedKeyCredential containing the
// storage account's name and either its primary or secondary key.
func NewSharedKeyCredential(accountName, accountKey string) (*SharedKeyCredential, error) {
return exported.NewSharedKeyCredential(accountName, accountKey)
}

// LeaseAccessConditions contains optional parameters to access leased entity.
type LeaseAccessConditions = generated.LeaseAccessConditions
// URLParts object represents the components that make up an Azure Storage Container/Blob URL.
// NOTE: Changing any SAS-related field requires computing a new SAS signature.
type URLParts = sas.URLParts

// ParseURL parses a URL initializing URLParts' fields including any SAS-related & snapshot query parameters. Any other
// query parameters remain in the UnparsedParams field. This method overwrites all fields in the URLParts object.
func ParseURL(u string) (URLParts, error) {
return sas.ParseURL(u)
}

// ModifiedAccessConditions contains a group of parameters for specifying access conditions.
type ModifiedAccessConditions = generated.ModifiedAccessConditions
// HTTPRange defines a range of bytes within an HTTP resource, starting at offset and
// ending at offset+count. A zero-value HTTPRange indicates the entire resource. An HTTPRange
// which has an offset but no zero value count indicates from the offset to the resource's end.
type HTTPRange = exported.HTTPRange
181 changes: 181 additions & 0 deletions sdk/storage/azdatalake/datalakeerror/error_codes.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,181 @@
//go:build go1.18
// +build go1.18

// Copyright (c) Microsoft Corporation. All rights reserved.
// Licensed under the MIT License. See License.txt in the project root for license information.

package datalakeerror

import (
"errors"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azblob/bloberror"

"github.com/Azure/azure-sdk-for-go/sdk/azcore"
)

// HasCode returns true if the provided error is an *azcore.ResponseError
// with its ErrorCode field equal to one of the specified Codes.
func HasCode(err error, codes ...Code) bool {
var respErr *azcore.ResponseError
if !errors.As(err, &respErr) {
return false
}

for _, code := range codes {
if respErr.ErrorCode == string(code) {
return true
}
}

return false
}

type StorageErrorCode string

// Code - Error codes returned by the service
type Code = bloberror.Code

const (
ContentLengthMustBeZero StorageErrorCode = "ContentLengthMustBeZero"
PathAlreadyExists StorageErrorCode = "PathAlreadyExists"
InvalidFlushPosition StorageErrorCode = "InvalidFlushPosition"
InvalidPropertyName StorageErrorCode = "InvalidPropertyName"
InvalidSourceURI StorageErrorCode = "InvalidSourceUri"
UnsupportedRestVersion StorageErrorCode = "UnsupportedRestVersion"
FileSystemNotFound StorageErrorCode = "FilesystemNotFound"
PathNotFound StorageErrorCode = "PathNotFound"
RenameDestinationParentPathNotFound StorageErrorCode = "RenameDestinationParentPathNotFound"
SourcePathNotFound StorageErrorCode = "SourcePathNotFound"
DestinationPathIsBeingDeleted StorageErrorCode = "DestinationPathIsBeingDeleted"
FileSystemAlreadyExists StorageErrorCode = "FilesystemAlreadyExists"
FileSystemBeingDeleted StorageErrorCode = "FilesystemBeingDeleted"
InvalidDestinationPath StorageErrorCode = "InvalidDestinationPath"
InvalidRenameSourcePath StorageErrorCode = "InvalidRenameSourcePath"
InvalidSourceOrDestinationResourceType StorageErrorCode = "InvalidSourceOrDestinationResourceType"
LeaseIsAlreadyBroken StorageErrorCode = "LeaseIsAlreadyBroken"
LeaseNameMismatch StorageErrorCode = "LeaseNameMismatch"
PathConflict StorageErrorCode = "PathConflict"
SourcePathIsBeingDeleted StorageErrorCode = "SourcePathIsBeingDeleted"
)

const (
AccountAlreadyExists Code = "AccountAlreadyExists"
AccountBeingCreated Code = "AccountBeingCreated"
AccountIsDisabled Code = "AccountIsDisabled"
AppendPositionConditionNotMet Code = "AppendPositionConditionNotMet"
AuthenticationFailed Code = "AuthenticationFailed"
AuthorizationFailure Code = "AuthorizationFailure"
AuthorizationPermissionMismatch Code = "AuthorizationPermissionMismatch"
AuthorizationProtocolMismatch Code = "AuthorizationProtocolMismatch"
AuthorizationResourceTypeMismatch Code = "AuthorizationResourceTypeMismatch"
AuthorizationServiceMismatch Code = "AuthorizationServiceMismatch"
AuthorizationSourceIPMismatch Code = "AuthorizationSourceIPMismatch"
BlobAlreadyExists Code = "BlobAlreadyExists"
PathArchived Code = "BlobArchived"
PathBeingRehydrated Code = "BlobBeingRehydrated"
PathImmutableDueToPolicy Code = "BlobImmutableDueToPolicy"
PathNotArchived Code = "BlobNotArchived"
BlobNotFound Code = "BlobNotFound"
PathOverwritten Code = "BlobOverwritten"
PathTierInadequateForContentLength Code = "BlobTierInadequateForContentLength"
PathUsesCustomerSpecifiedEncryption Code = "BlobUsesCustomerSpecifiedEncryption"
BlockCountExceedsLimit Code = "BlockCountExceedsLimit"
BlockListTooLong Code = "BlockListTooLong"
CannotChangeToLowerTier Code = "CannotChangeToLowerTier"
CannotVerifyCopySource Code = "CannotVerifyCopySource"
ConditionHeadersNotSupported Code = "ConditionHeadersNotSupported"
ConditionNotMet Code = "ConditionNotMet"
FilesystemAlreadyExists Code = "ContainerAlreadyExists"
ContainerBeingDeleted Code = "ContainerBeingDeleted"
ContainerDisabled Code = "ContainerDisabled"
ContainerNotFound Code = "ContainerNotFound"
ContentLengthLargerThanTierLimit Code = "ContentLengthLargerThanTierLimit"
CopyAcrossAccountsNotSupported Code = "CopyAcrossAccountsNotSupported"
CopyIDMismatch Code = "CopyIdMismatch"
EmptyMetadataKey Code = "EmptyMetadataKey"
FeatureVersionMismatch Code = "FeatureVersionMismatch"
IncrementalCopyPathMismatch Code = "IncrementalCopyBlobMismatch"
IncrementalCopyOfEralierVersionSnapshotNotAllowed Code = "IncrementalCopyOfEralierVersionSnapshotNotAllowed"
IncrementalCopySourceMustBeSnapshot Code = "IncrementalCopySourceMustBeSnapshot"
InfiniteLeaseDurationRequired Code = "InfiniteLeaseDurationRequired"
InsufficientAccountPermissions Code = "InsufficientAccountPermissions"
InternalError Code = "InternalError"
InvalidAuthenticationInfo Code = "InvalidAuthenticationInfo"
InvalidBlobOrBlock Code = "InvalidBlobOrBlock"
InvalidPathTier Code = "InvalidBlobTier"
InvalidPathType Code = "InvalidBlobType"
InvalidBlockID Code = "InvalidBlockId"
InvalidBlockList Code = "InvalidBlockList"
InvalidHTTPVerb Code = "InvalidHttpVerb"
InvalidHeaderValue Code = "InvalidHeaderValue"
InvalidInput Code = "InvalidInput"
InvalidMD5 Code = "InvalidMd5"
InvalidMetadata Code = "InvalidMetadata"
InvalidOperation Code = "InvalidOperation"
InvalidPageRange Code = "InvalidPageRange"
InvalidQueryParameterValue Code = "InvalidQueryParameterValue"
InvalidRange Code = "InvalidRange"
InvalidResourceName Code = "InvalidResourceName"
InvalidSourcePathType Code = "InvalidSourceBlobType"
InvalidSourcePathURL Code = "InvalidSourceBlobUrl"
InvalidURI Code = "InvalidUri"
InvalidVersionForPageBlobOperation Code = "InvalidVersionForPageBlobOperation"
InvalidXMLDocument Code = "InvalidXmlDocument"
InvalidXMLNodeValue Code = "InvalidXmlNodeValue"
LeaseAlreadyBroken Code = "LeaseAlreadyBroken"
LeaseAlreadyPresent Code = "LeaseAlreadyPresent"
LeaseIDMismatchWithBlobOperation Code = "LeaseIdMismatchWithBlobOperation"
LeaseIDMismatchWithContainerOperation Code = "LeaseIdMismatchWithContainerOperation"
LeaseIDMismatchWithLeaseOperation Code = "LeaseIdMismatchWithLeaseOperation"
LeaseIDMissing Code = "LeaseIdMissing"
LeaseIsBreakingAndCannotBeAcquired Code = "LeaseIsBreakingAndCannotBeAcquired"
LeaseIsBreakingAndCannotBeChanged Code = "LeaseIsBreakingAndCannotBeChanged"
LeaseIsBrokenAndCannotBeRenewed Code = "LeaseIsBrokenAndCannotBeRenewed"
LeaseLost Code = "LeaseLost"
LeaseNotPresentWithBlobOperation Code = "LeaseNotPresentWithBlobOperation"
LeaseNotPresentWithContainerOperation Code = "LeaseNotPresentWithContainerOperation"
LeaseNotPresentWithLeaseOperation Code = "LeaseNotPresentWithLeaseOperation"
MD5Mismatch Code = "Md5Mismatch"
CRC64Mismatch Code = "Crc64Mismatch"
MaxBlobSizeConditionNotMet Code = "MaxBlobSizeConditionNotMet"
MetadataTooLarge Code = "MetadataTooLarge"
MissingContentLengthHeader Code = "MissingContentLengthHeader"
MissingRequiredHeader Code = "MissingRequiredHeader"
MissingRequiredQueryParameter Code = "MissingRequiredQueryParameter"
MissingRequiredXMLNode Code = "MissingRequiredXmlNode"
MultipleConditionHeadersNotSupported Code = "MultipleConditionHeadersNotSupported"
NoAuthenticationInformation Code = "NoAuthenticationInformation"
NoPendingCopyOperation Code = "NoPendingCopyOperation"
OperationNotAllowedOnIncrementalCopyBlob Code = "OperationNotAllowedOnIncrementalCopyBlob"
OperationTimedOut Code = "OperationTimedOut"
OutOfRangeInput Code = "OutOfRangeInput"
OutOfRangeQueryParameterValue Code = "OutOfRangeQueryParameterValue"
PendingCopyOperation Code = "PendingCopyOperation"
PreviousSnapshotCannotBeNewer Code = "PreviousSnapshotCannotBeNewer"
PreviousSnapshotNotFound Code = "PreviousSnapshotNotFound"
PreviousSnapshotOperationNotSupported Code = "PreviousSnapshotOperationNotSupported"
RequestBodyTooLarge Code = "RequestBodyTooLarge"
RequestURLFailedToParse Code = "RequestUrlFailedToParse"
ResourceAlreadyExists Code = "ResourceAlreadyExists"
ResourceNotFound Code = "ResourceNotFound"
ResourceTypeMismatch Code = "ResourceTypeMismatch"
SequenceNumberConditionNotMet Code = "SequenceNumberConditionNotMet"
SequenceNumberIncrementTooLarge Code = "SequenceNumberIncrementTooLarge"
ServerBusy Code = "ServerBusy"
SnapshotCountExceeded Code = "SnapshotCountExceeded"
SnapshotOperationRateExceeded Code = "SnapshotOperationRateExceeded"
SnapshotsPresent Code = "SnapshotsPresent"
SourceConditionNotMet Code = "SourceConditionNotMet"
SystemInUse Code = "SystemInUse"
TargetConditionNotMet Code = "TargetConditionNotMet"
UnauthorizedBlobOverwrite Code = "UnauthorizedBlobOverwrite"
UnsupportedHTTPVerb Code = "UnsupportedHttpVerb"
UnsupportedHeader Code = "UnsupportedHeader"
UnsupportedQueryParameter Code = "UnsupportedQueryParameter"
UnsupportedXMLNode Code = "UnsupportedXmlNode"
)

var (
// MissingSharedKeyCredential - Error is returned when SAS URL is being created without SharedKeyCredential.
MissingSharedKeyCredential = bloberror.MissingSharedKeyCredential
)
tasherif-msft marked this conversation as resolved.
Show resolved Hide resolved
62 changes: 54 additions & 8 deletions sdk/storage/azdatalake/directory/client.go
Original file line number Diff line number Diff line change
Expand Up @@ -25,11 +25,41 @@ type ClientOptions base.ClientOptions
// Client represents a URL to the Azure Datalake Storage service.
type Client base.CompositeClient[generated.PathClient, generated.PathClient, blob.Client]

//TODO: NewClient()
// NewClient creates an instance of Client with the specified values.
// - directoryURL - the URL of the directory e.g. https://<account>.dfs.core.windows.net/fs/dir
// - cred - an Azure AD credential, typically obtained via the azidentity module
// - options - client options; pass nil to accept the default values
func NewClient(directoryURL string, cred azcore.TokenCredential, options *ClientOptions) (*Client, error) {
blobURL := strings.Replace(directoryURL, ".dfs.", ".blob.", 1)
directoryURL = strings.Replace(directoryURL, ".blob.", ".dfs.", 1)

authPolicy := shared.NewStorageChallengePolicy(cred)
tasherif-msft marked this conversation as resolved.
Show resolved Hide resolved
conOptions := shared.GetClientOptions(options)
plOpts := runtime.PipelineOptions{
PerRetry: []policy.Policy{authPolicy},
}
base.SetPipelineOptions((*base.ClientOptions)(conOptions), &plOpts)

azClient, err := azcore.NewClient(shared.FileClient, exported.ModuleVersion, plOpts, &conOptions.ClientOptions)
if err != nil {
return nil, err
}

if options == nil {
options = &ClientOptions{}
}
blobClientOpts := blob.ClientOptions{
ClientOptions: options.ClientOptions,
}
blobClient, _ := blob.NewClient(blobURL, cred, &blobClientOpts)
dirClient := base.NewPathClient(directoryURL, blobURL, blobClient, azClient, nil, (*base.ClientOptions)(conOptions))

return (*Client)(dirClient), nil
}

// NewClientWithNoCredential creates an instance of Client with the specified values.
// This is used to anonymously access a storage account or with a shared access signature (SAS) token.
// - serviceURL - the URL of the storage account e.g. https://<account>.dfs.core.windows.net/?<sas token>
// - directoryURL - the URL of the storage account e.g. https://<account>.dfs.core.windows.net/fs/dir?<sas token>
// - options - client options; pass nil to accept the default values
func NewClientWithNoCredential(directoryURL string, options *ClientOptions) (*Client, error) {
blobURL := strings.Replace(directoryURL, ".dfs.", ".blob.", 1)
Expand All @@ -44,6 +74,9 @@ func NewClientWithNoCredential(directoryURL string, options *ClientOptions) (*Cl
return nil, err
}

if options == nil {
options = &ClientOptions{}
}
blobClientOpts := blob.ClientOptions{
ClientOptions: options.ClientOptions,
}
Expand All @@ -54,7 +87,7 @@ func NewClientWithNoCredential(directoryURL string, options *ClientOptions) (*Cl
}

// NewClientWithSharedKeyCredential creates an instance of Client with the specified values.
// - serviceURL - the URL of the storage account e.g. https://<account>.dfs.core.windows.net/
// - directoryURL - the URL of the storage account e.g. https://<account>.dfs.core.windows.net/fs/dir
// - cred - a SharedKeyCredential created with the matching storage account and access key
// - options - client options; pass nil to accept the default values
func NewClientWithSharedKeyCredential(directoryURL string, cred *SharedKeyCredential, options *ClientOptions) (*Client, error) {
Expand All @@ -73,6 +106,9 @@ func NewClientWithSharedKeyCredential(directoryURL string, cred *SharedKeyCreden
return nil, err
}

if options == nil {
options = &ClientOptions{}
}
blobClientOpts := blob.ClientOptions{
ClientOptions: options.ClientOptions,
}
Expand Down Expand Up @@ -103,13 +139,13 @@ func NewClientFromConnectionString(connectionString string, options *ClientOptio
return NewClientWithNoCredential(parsed.ServiceURL, options)
}

func (d *Client) generatedFSClientWithDFS() *generated.PathClient {
func (d *Client) generatedDirClientWithDFS() *generated.PathClient {
//base.SharedKeyComposite((*base.CompositeClient[generated.BlobClient, generated.BlockBlobClient])(bb))
dirClientWithDFS, _, _ := base.InnerClients((*base.CompositeClient[generated.PathClient, generated.PathClient, blob.Client])(d))
return dirClientWithDFS
}

func (d *Client) generatedFSClientWithBlob() *generated.PathClient {
func (d *Client) generatedDirClientWithBlob() *generated.PathClient {
_, dirClientWithBlob, _ := base.InnerClients((*base.CompositeClient[generated.PathClient, generated.PathClient, blob.Client])(d))
return dirClientWithBlob
}
Expand All @@ -123,9 +159,14 @@ func (d *Client) sharedKey() *exported.SharedKeyCredential {
return base.SharedKeyComposite((*base.CompositeClient[generated.PathClient, generated.PathClient, blob.Client])(d))
}

// URL returns the URL endpoint used by the Client object.
func (d *Client) URL() string {
return "s.generated().Endpoint()"
// DFSURL returns the URL endpoint used by the Client object.
func (d *Client) DFSURL() string {
tasherif-msft marked this conversation as resolved.
Show resolved Hide resolved
return d.generatedDirClientWithDFS().Endpoint()
}

// BlobURL returns the URL endpoint used by the Client object.
func (d *Client) BlobURL() string {
return d.generatedDirClientWithBlob().Endpoint()
}

// Create creates a new directory (dfs1).
Expand Down Expand Up @@ -190,3 +231,8 @@ func (d *Client) SetHTTPHeaders(ctx context.Context, httpHeaders HTTPHeaders, op
// TODO: call into blob
return SetHTTPHeadersResponse{}, nil
}

// UndeletePath restores the specified path that was previously deleted. (dfs op/blob2).
func (d *Client) UndeletePath(ctx context.Context, path string, options *UndeletePathOptions) (UndeletePathResponse, error) {
return UndeletePathResponse{}, nil
}
Loading