Documentation ¶
Index ¶
- Constants
- Variables
- func LoadAzureCredentials() (map[string]string, error)
- func NewServicePrincipalTokenFromCredentials(c map[string]string, scope string) (*azure.ServicePrincipalToken, error)
- type AzureClient
- func (c *AzureClient) CreateInstance(instanceId string, parameters interface{}) (string, string, error)
- func (c *AzureClient) DeleteInstance(resourceGroupName, storageAccountName string) error
- func (c *AzureClient) GetAccessKeys(instanceId, resourceGroupName, storageAccountName string, ...) (string, string, string, error)
- func (c *AzureClient) GetInstanceState(resourceGroupName, storageAccountName string) (storage.ProvisioningState, error)
- func (c *AzureClient) RegenerateAccessKeys(resourceGroupName, storageAccountName string) error
- type Client
Constants ¶
View Source
const ( RESOURCE_GROUP_NAME_PREFIX = "cloud-foundry-" STORAGE_ACCOUNT_NAME_PREFIX = "cf" CONTAINER_NAME_PREFIX = "cloud-foundry-" LOCATION = "westus" )
Variables ¶
View Source
var ( ErrNotFoundSubscriptionID = errors.New("No subscriptionID provided in environment variables") ErrNotFoundTenantID = errors.New("No tenantID provided in environment variables") ErrNotFoundClientID = errors.New("No clientID provided in environment variables") ErrNotFoundClientSecret = errors.New("No clientSecret provided in environment variables") )
Functions ¶
func LoadAzureCredentials ¶
LoadAzureCredentials reads credentials from environment variables
func NewServicePrincipalTokenFromCredentials ¶
func NewServicePrincipalTokenFromCredentials(c map[string]string, scope string) (*azure.ServicePrincipalToken, error)
NewServicePrincipalTokenFromCredentials creates a new ServicePrincipalToken using values of the passed credentials map.
Types ¶
type AzureClient ¶
type AzureClient struct { ResourceManagementClient *resources.ResourceGroupsClient StorageAccountsClient *storage.StorageAccountsClient }
func NewClient ¶
func NewClient() *AzureClient
func (*AzureClient) CreateInstance ¶
func (c *AzureClient) CreateInstance(instanceId string, parameters interface{}) (string, string, error)
func (*AzureClient) DeleteInstance ¶
func (c *AzureClient) DeleteInstance(resourceGroupName, storageAccountName string) error
func (*AzureClient) GetAccessKeys ¶
func (c *AzureClient) GetAccessKeys(instanceId, resourceGroupName, storageAccountName string, containerAccessType storageclient.ContainerAccessType) (string, string, string, error)
func (*AzureClient) GetInstanceState ¶
func (c *AzureClient) GetInstanceState(resourceGroupName, storageAccountName string) (storage.ProvisioningState, error)
func (*AzureClient) RegenerateAccessKeys ¶
func (c *AzureClient) RegenerateAccessKeys(resourceGroupName, storageAccountName string) error
type Client ¶
type Client interface { CreateInstance(instanceId string, parameters interface{}) (string, string, error) GetInstanceState(resourceGroupName, storageAccountName string) (storage.ProvisioningState, error) GetAccessKeys(resourceGroupName, storageAccountName, containerName string, containerAccessType storageclient.ContainerAccessType) (string, string, string, error) DeleteInstance(resourceGroupName, storageAccountName string) error RegenerateAccessKeys(resourceGroupName, storageAccountName string) error }
Click to show internal directories.
Click to hide internal directories.