Documentation ¶
Index ¶
- type Azure
- type AzureConnection
- func (az *AzureConnection) CreateStorageAccount(accountName, accountGroupName string, tags map[string]*string, httpsOnly bool, ...) (storage.Account, error)
- func (az *AzureConnection) DeleteStorageAccount(resourceGroupName, accountName string) error
- func (az *AzureConnection) GetResourceGroupByName(name string) (resources.Group, error)
- func (az *AzureConnection) IsCloudAvailable() error
- type AzureCredentials
- type AzureResourceGroup
- type AzureStorageAccount
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Azure ¶
type Azure interface { IsCloudAvailable() error GetResourceGroupByName(name string) (resources.Group, error) CreateStorageAccount(accountName, accountGroupName string, tags map[string]*string, httpsOnly bool, networkRuleSet *storage.NetworkRuleSet) (storage.Account, error) DeleteStorageAccount(resourceGroupName, accountName string) error }
Azure interface defining all azure methods
type AzureConnection ¶
type AzureConnection struct { ResourceGroup *AzureResourceGroup // Client obj to interact with Azure Resource Groups StorageAccount *AzureStorageAccount // Client obj to interact with Azure Storage Accounts // contains filtered or unexported fields }
AzureConnection simplifies the connection with cloud provider
func NewAzureConnection ¶
func NewAzureConnection(c context.Context, subscriptionID, tenantID, clientID, clientSecret string) (azConn *AzureConnection)
NewAzureConnection provides a singleton instance of AzureConnection. Initializes all internal clients to interact with Azure.
func (*AzureConnection) CreateStorageAccount ¶
func (az *AzureConnection) CreateStorageAccount(accountName, accountGroupName string, tags map[string]*string, httpsOnly bool, networkRuleSet *storage.NetworkRuleSet) (storage.Account, error)
CreateStorageAccount creates a storage account
func (*AzureConnection) DeleteStorageAccount ¶
func (az *AzureConnection) DeleteStorageAccount(resourceGroupName, accountName string) error
DeleteStorageAccount deletes a storage account
func (*AzureConnection) GetResourceGroupByName ¶
func (az *AzureConnection) GetResourceGroupByName(name string) (resources.Group, error)
GetResourceGroupByName returns an existing Resource Group by name
func (*AzureConnection) IsCloudAvailable ¶
func (az *AzureConnection) IsCloudAvailable() error
IsCloudAvailable verifies that the connection instantiation did not report a failure
type AzureCredentials ¶
type AzureCredentials struct {
SubscriptionID, ClientID, TenantID, ClientSecret string
Authorizer autorest.Authorizer
}
AzureCredentials ...
type AzureResourceGroup ¶
type AzureResourceGroup struct {
// contains filtered or unexported fields
}
AzureResourceGroup ...
func NewResourceGroup ¶
func NewResourceGroup(c context.Context, creds AzureCredentials) (rg *AzureResourceGroup, err error)
NewResourceGroup provides a new instance of AzureResourceGroup
type AzureStorageAccount ¶
type AzureStorageAccount struct {
// contains filtered or unexported fields
}
AzureStorageAccount ...
func NewStorageAccount ¶
func NewStorageAccount(c context.Context, creds AzureCredentials) (sa *AzureStorageAccount, err error)
NewStorageAccount provides a new instance of AzureStorageAccount
func (*AzureStorageAccount) Create ¶
func (sa *AzureStorageAccount) Create(accountName, accountGroupName string, tags map[string]*string, httpsOnly bool, networkRuleSet *storage.NetworkRuleSet) (storage.Account, error)
Create starts creation of a new Storage Account and waits for the account to be created.
func (*AzureStorageAccount) Delete ¶
func (sa *AzureStorageAccount) Delete(resourceGroupName, accountName string) error
Delete deletes a storage account given the resource group and account name