Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
6 changes: 6 additions & 0 deletions sdk/storage/azfile/directory/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,12 @@ import (
// 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)
}

// ---------------------------------------------------------------------------------------------------------------------

// CreateOptions contains the optional parameters for the Client.Create method.
Expand Down
3 changes: 1 addition & 2 deletions sdk/storage/azfile/file/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@ import (
"github.com/Azure/azure-sdk-for-go/sdk/storage/azfile/internal/shared"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azfile/internal/testcommon"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azfile/sas"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azfile/service"
"github.com/Azure/azure-sdk-for-go/sdk/storage/azfile/share"
"github.com/stretchr/testify/require"
"github.com/stretchr/testify/suite"
Expand Down Expand Up @@ -1586,7 +1585,7 @@ func (f *FileRecordedTestsSuite) TestSASFileClientSignNegative() {
_require.Greater(len(accountName), 0)
_require.Greater(len(accountKey), 0)

cred, err := service.NewSharedKeyCredential(accountName, accountKey)
cred, err := file.NewSharedKeyCredential(accountName, accountKey)
_require.NoError(err)

testName := f.T().Name()
Expand Down
6 changes: 6 additions & 0 deletions sdk/storage/azfile/file/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,12 @@ import (
// 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)
}

// SMBProperties contains the optional parameters regarding the SMB/NTFS properties for a file.
type SMBProperties = exported.SMBProperties

Expand Down
2 changes: 1 addition & 1 deletion sdk/storage/azfile/share/client_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -1429,7 +1429,7 @@ func (s *ShareRecordedTestsSuite) TestSASShareClientSignNegative() {
_require.Greater(len(accountName), 0)
_require.Greater(len(accountKey), 0)

cred, err := service.NewSharedKeyCredential(accountName, accountKey)
cred, err := share.NewSharedKeyCredential(accountName, accountKey)
_require.NoError(err)

testName := s.T().Name()
Expand Down
6 changes: 6 additions & 0 deletions sdk/storage/azfile/share/models.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,12 @@ import (
// 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)
}

// ---------------------------------------------------------------------------------------------------------------------

// CreateOptions contains the optional parameters for the Client.Create method.
Expand Down