Documentation
¶
Index ¶
- Constants
- func AreVNetRulesEqual(account *armstorage.Account, accountOptions *AccountOptions) bool
- func GetStorageAccesskey(ctx context.Context, saClient accountclient.Interface, ...) (string, error)
- type AccountOptions
- type AccountRepo
- func (az *AccountRepo) AddStorageAccountTags(ctx context.Context, subsID, resourceGroup, account string, ...) error
- func (az *AccountRepo) EnsureStorageAccount(ctx context.Context, accountOptions *AccountOptions, ...) (string, string, error)
- func (az *AccountRepo) GetStorageAccesskey(ctx context.Context, accountClient accountclient.Interface, ...) (string, error)
- func (az *AccountRepo) GetStorageAccesskeyFromServiceAccountToken(ctx context.Context, ...) (string, error)
- func (az *AccountRepo) RemoveStorageAccountTag(ctx context.Context, subsID, resourceGroup, account, key string) error
- type Type
Constants ¶
const ( // DefaultStorageAccountType is the default storage account type DefaultStorageAccountType = string(armstorage.SKUNameStandardLRS) // DefaultStorageAccountKind is the default storage account kind DefaultStorageAccountKind = armstorage.KindStorageV2 FileShareAccountNamePrefix = "f" SharedDiskAccountNamePrefix = "ds" // DedicatedDiskAccountNamePrefix is the dedicated disk account name prefix DedicatedDiskAccountNamePrefix = "dd" )
const DefaultTokenAudience = "api://AzureADTokenExchange" //nolint:gosec // G101 ignore this!
const LocationGlobal = "global"
const SkipMatchingTag = "skip-matching"
SkipMatchingTag skip account matching tag
Variables ¶
This section is empty.
Functions ¶
func AreVNetRulesEqual ¶ added in v1.32.0
func AreVNetRulesEqual(account *armstorage.Account, accountOptions *AccountOptions) bool
func GetStorageAccesskey ¶
func GetStorageAccesskey(ctx context.Context, saClient accountclient.Interface, account, resourceGroup string, getLatestAccountKey bool) (string, error)
GetStorageAccesskey gets the storage account access key getLatestAccountKey: get the latest account key per CreationTime if true, otherwise get the first account key
Types ¶
type AccountOptions ¶ added in v1.32.0
type AccountOptions struct { SubscriptionID string Name, Type, Kind, ResourceGroup, Location string EnableHTTPSTrafficOnly bool // indicate whether create new account when Name is empty or when account does not exists CreateAccount bool CreatePrivateEndpoint *bool StorageType Type StorageEndpointSuffix string DisableFileServiceDeleteRetentionPolicy *bool IsHnsEnabled *bool EnableNfsV3 *bool AllowBlobPublicAccess *bool RequireInfrastructureEncryption *bool IsMultichannelEnabled *bool KeyName *string KeyVersion *string KeyVaultURI *string Tags map[string]string VirtualNetworkResourceIDs []string VNetResourceGroup string VNetName string SubnetName string AccessTier string MatchTags bool GetLatestAccountKey bool EnableBlobVersioning *bool SoftDeleteBlobs int32 SoftDeleteContainers int32 // indicate whether to get a random matching account, if false, will get the first matching account PickRandomMatchingAccount bool // provide the source account name in snapshot restore and volume clone scenarios SourceAccountName string // default is "privatelink" PrivateDNSZoneName string }
AccountOptions contains the fields which are used to create storage account.
type AccountRepo ¶ added in v1.32.0
type AccountRepo struct { azureconfig.Config Environment *azclient.Environment ComputeClientFactory azclient.ClientFactory NetworkClientFactory azclient.ClientFactory // contains filtered or unexported fields }
func NewRepository ¶ added in v1.32.0
func NewRepository(config azureconfig.Config, env *azclient.Environment, computeClientFactory azclient.ClientFactory, networkClientFactory azclient.ClientFactory) (*AccountRepo, error)
func (*AccountRepo) AddStorageAccountTags ¶ added in v1.32.0
func (az *AccountRepo) AddStorageAccountTags(ctx context.Context, subsID, resourceGroup, account string, tags map[string]*string) error
AddStorageAccountTags add tags to storage account
func (*AccountRepo) EnsureStorageAccount ¶ added in v1.32.0
func (az *AccountRepo) EnsureStorageAccount(ctx context.Context, accountOptions *AccountOptions, genAccountNamePrefix string) (string, string, error)
EnsureStorageAccount search storage account, create one storage account(with genAccountNamePrefix) if not found, return accountName, accountKey
func (*AccountRepo) GetStorageAccesskey ¶ added in v1.32.0
func (az *AccountRepo) GetStorageAccesskey(ctx context.Context, accountClient accountclient.Interface, account, resourceGroup string, getLatestAccountKey bool) (string, error)
GetStorageAccesskey gets the storage account access key getLatestAccountKey: get the latest account key per CreationTime if true, otherwise get the first account key
func (*AccountRepo) GetStorageAccesskeyFromServiceAccountToken ¶ added in v1.32.0
func (*AccountRepo) RemoveStorageAccountTag ¶ added in v1.32.0
func (az *AccountRepo) RemoveStorageAccountTag(ctx context.Context, subsID, resourceGroup, account, key string) error
RemoveStorageAccountTag remove tag from storage account
Directories
¶
Path | Synopsis |
---|---|
mock_fileservice
Package mock_fileservice is a generated GoMock package.
|
Package mock_fileservice is a generated GoMock package. |