Documentation ¶
Index ¶
- Constants
- Variables
- func AzureGetRequiredEnv() []string
- func ExtractResourceGroupFromID(ctx context.Context, id string) string
- func FromStrPointerMap(pointerMap map[string]*string) map[string]string
- func GetAzureClientSecretCredential(azCfg AzureCredentials) (*azidentity.ClientSecretCredential, error)
- func GetStorageAccountType(ctx context.Context, env *cloudy.Environment, name string) (string, error)
- func IsAvailable(restrictions []*armcompute.ResourceSKURestrictions) bool
- func IsInLocation(region string, locations []*string) bool
- func LoadEnvironment(ctx context.Context) (*cloudy.Environment, error)
- func NewUsageClient(ctx context.Context, config *AzureVMControllerConfig) (*armcompute.UsageClient, error)
- func NewVMClient(ctx context.Context, config *AzureVMControllerConfig) (*armcompute.VirtualMachinesClient, error)
- func SizeFromResource(ctx context.Context, res *armcompute.ResourceSKU) *cloudyvm.VmSize
- func ToStrPointerMap(stringMap map[string]string) map[string]*string
- func VMAddTag(ctx context.Context)
- func VMGetPowerState(vm *armcompute.VirtualMachine) string
- func VmCreate(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, ...) (*cloudyvm.VirtualMachineConfiguration, error)
- func VmList(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, rg string) ([]*cloudyvm.VirtualMachineStatus, error)
- func VmStart(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, vmName string, ...) error
- func VmState(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, ...) (*cloudyvm.VirtualMachineStatus, error)
- func VmStatus(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, vmName string, ...) (*cloudyvm.VirtualMachineStatus, error)
- func VmStop(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, vmName string, ...) error
- func VmTerminate(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, vmName string, ...) error
- type AVDManagerFactory
- type AzureBlobFileShareFactory
- type AzureBlobStorageFactory
- type AzureCosmosDbDatastore
- func (az *AzureCosmosDbDatastore) Close(ctx context.Context) error
- func (az *AzureCosmosDbDatastore) Delete(ctx context.Context, key string) error
- func (az *AzureCosmosDbDatastore) Exists(ctx context.Context, key string) (bool, error)
- func (az *AzureCosmosDbDatastore) Get(ctx context.Context, key string) (interface{}, error)
- func (az *AzureCosmosDbDatastore) GetAll(ctx context.Context) ([]interface{}, error)
- func (az *AzureCosmosDbDatastore) Open(ctx context.Context, config interface{}) error
- func (az *AzureCosmosDbDatastore) Ping(ctx context.Context) bool
- func (az *AzureCosmosDbDatastore) Query(ctx context.Context, query *datastore.SimpleQuery) ([]interface{}, error)
- func (az *AzureCosmosDbDatastore) Save(ctx context.Context, item interface{}, key string) error
- type AzureCredentialLoader
- type AzureCredentials
- type AzureFileShareFactory
- type AzureVMController
- func (vmc *AzureVMController) ConfigureDiskSize(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) (int32, error)
- func (vmc *AzureVMController) ConfigureVmOsDiskOsTypeType(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) *armcompute.OperatingSystemTypes
- func (vmc *AzureVMController) ConfigureVmOsProfile(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) *armcompute.OSProfile
- func (vmc *AzureVMController) Create(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) (*cloudyvm.VirtualMachineConfiguration, error)
- func (vmc *AzureVMController) CreateNIC(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration, subnetId string) error
- func (vmc *AzureVMController) CreateNSG(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) (string, error)
- func (vmc *AzureVMController) CreateVirtualMachine(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) error
- func (vmc *AzureVMController) Delete(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) (*cloudyvm.VirtualMachineConfiguration, error)
- func (vmc *AzureVMController) DeleteNIC(ctx context.Context, vmId string, nicName string) error
- func (vmc *AzureVMController) DeleteVM(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) error
- func (vmc *AzureVMController) DeleteVMOSDisk(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) error
- func (vmc *AzureVMController) FindBestSubnet(ctx context.Context, availableSubnets []string) (string, error)
- func (vmc *AzureVMController) GetAvailableIPS(ctx context.Context, subnet string) (int, error)
- func (vmc *AzureVMController) GetLatestImageVersion(ctx context.Context, imageName string) (string, error)
- func (vmc *AzureVMController) GetLimits(ctx context.Context) ([]*cloudyvm.VirtualMachineLimit, error)
- func (vmc *AzureVMController) GetNIC(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) (*cloudyvm.VirtualMachineNetwork, error)
- func (vmc *AzureVMController) GetNSG(ctx context.Context, name string) (*armnetwork.SecurityGroup, error)
- func (vmc *AzureVMController) GetVM(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) (*cloudyvm.VirtualMachineConfiguration, error)
- func (vmc *AzureVMController) GetVMSize(ctx context.Context, size string) (*cloudyvm.VmSize, error)
- func (vmc *AzureVMController) GetVMSizes(ctx context.Context) (map[string]*cloudyvm.VmSize, error)
- func (vmc *AzureVMController) GetVmOsDisk(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) (*cloudyvm.VirtualMachineDisk, error)
- func (vmc *AzureVMController) ListAll(ctx context.Context) ([]*cloudyvm.VirtualMachineStatus, error)
- func (vmc *AzureVMController) ListWithTag(ctx context.Context, tag string) ([]*cloudyvm.VirtualMachineStatus, error)
- func (vmc *AzureVMController) SetState(ctx context.Context, state cloudyvm.VirtualMachineAction, vmName string, ...) (*cloudyvm.VirtualMachineStatus, error)
- func (vmc *AzureVMController) Start(ctx context.Context, vmName string, wait bool) error
- func (vmc *AzureVMController) Status(ctx context.Context, vmName string) (*cloudyvm.VirtualMachineStatus, error)
- func (vmc *AzureVMController) Stop(ctx context.Context, vmName string, wait bool) error
- func (vmc *AzureVMController) Terminate(ctx context.Context, vmName string, wait bool) error
- func (vmc *AzureVMController) ValidateConfiguration(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) error
- type AzureVMControllerConfig
- type AzureVMControllerFactory
- type AzureVMSizeCache
- type AzureVirtualDesktop
- func (avd *AzureVirtualDesktop) AssignRoleToUser(ctx context.Context, rg string, roleid string, upn string) error
- func (avd *AzureVirtualDesktop) AssignSessionHost(ctx context.Context, rg string, hpname string, sessionhost string, ...) error
- func (avd *AzureVirtualDesktop) DeleteSessionHost(ctx context.Context, rg string, hpname string, sessionhost string) error
- func (avd *AzureVirtualDesktop) DeleteUserSession(ctx context.Context, rg string, hpname string, sessionHost string, upn string) error
- func (avd *AzureVirtualDesktop) DisconnecteUserSession(ctx context.Context, rg string, hpname string, sessionHost string, upn string) error
- func (avd *AzureVirtualDesktop) FindFirstAvailableHostPool(ctx context.Context, rg string, upn string) (*string, error)
- func (avd *AzureVirtualDesktop) RetrieveRegistrationToken(ctx context.Context, rg string, hpname string) (*string, error)
- type AzureVirtualDesktopConfig
- type BlobContainerShare
- func (bfs *BlobContainerShare) Create(ctx context.Context, key string, tags map[string]string) (*storage.FileShare, error)
- func (bfs *BlobContainerShare) Delete(ctx context.Context, key string) error
- func (bfs *BlobContainerShare) Exists(ctx context.Context, key string) (bool, error)
- func (bfs *BlobContainerShare) Get(ctx context.Context, key string) (*storage.FileShare, error)
- func (bfs *BlobContainerShare) List(ctx context.Context) ([]*storage.FileShare, error)
- type BlobFileShare
- func (bfs *BlobFileShare) Connect(ctx context.Context) error
- func (bfs *BlobFileShare) Create(ctx context.Context, key string, tags map[string]string) (*storage.FileShare, error)
- func (bfs *BlobFileShare) Delete(ctx context.Context, key string) error
- func (bfs *BlobFileShare) Exists(ctx context.Context, key string) (bool, error)
- func (bfs *BlobFileShare) Get(ctx context.Context, key string) (*storage.FileShare, error)
- func (bfs *BlobFileShare) List(ctx context.Context) ([]*storage.FileShare, error)
- type BlobStorage
- func (b *BlobStorage) Delete(ctx context.Context, key string) error
- func (b *BlobStorage) Download(ctx context.Context, key string) (io.ReadCloser, error)
- func (b *BlobStorage) Exists(ctx context.Context, key string) (bool, error)
- func (b *BlobStorage) List(ctx context.Context, prefix string) ([]*storage.StoredObject, []*storage.StoredPrefix, error)
- func (b *BlobStorage) ListNative(ctx context.Context, prefix string) ([]*container.BlobItem, []*container.BlobPrefix, error)
- func (b *BlobStorage) TagsToMap(tags *container.BlobTags) map[string]string
- func (b *BlobStorage) ToStoredObject(item *container.BlobItem) *storage.StoredObject
- func (b *BlobStorage) UpdateMetadata(ctx context.Context, key string, tags map[string]string) error
- func (b *BlobStorage) Upload(ctx context.Context, key string, data io.Reader, tags map[string]string) error
- type BlobStorageAccount
- func (sa *BlobStorageAccount) Create(ctx context.Context, key string, openToPublic bool, tags map[string]string) (storage.ObjectStorage, error)
- func (sa *BlobStorageAccount) Delete(ctx context.Context, key string) error
- func (sa *BlobStorageAccount) Exists(ctx context.Context, key string) (bool, error)
- func (sa *BlobStorageAccount) Get(ctx context.Context, key string) (storage.ObjectStorage, error)
- func (sa *BlobStorageAccount) GetBlobContainer(ctx context.Context, name string) (*storage.StorageArea, error)
- func (sa *BlobStorageAccount) GetItem(ctx context.Context, key string) (*storage.StorageArea, error)
- func (sa *BlobStorageAccount) List(ctx context.Context) ([]*storage.StorageArea, error)
- type CosmosObject
- type Cosmosdb
- func (c *Cosmosdb) Add(id string, v interface{}) error
- func (c *Cosmosdb) Exists(id string) (bool, error)
- func (c *Cosmosdb) Get(id string) (interface{}, error)
- func (c *Cosmosdb) GetAll() ([]interface{}, error)
- func (c *Cosmosdb) GetRaw(id string) (*CosmosObject, error)
- func (c *Cosmosdb) Remove(id string) error
- func (c *Cosmosdb) Update(id string, item interface{}) error
- func (c *Cosmosdb) Upsert(id string, item interface{}) error
- type KeyVault
- func (k *KeyVault) Configure(ctx context.Context) error
- func (k *KeyVault) DeleteSecret(ctx context.Context, key string) error
- func (k *KeyVault) GetSecret(ctx context.Context, key string) (string, error)
- func (k *KeyVault) GetSecretBinary(ctx context.Context, key string) ([]byte, error)
- func (k *KeyVault) IsConflictErr(err error) bool
- func (k *KeyVault) IsNotFound(err error) bool
- func (k *KeyVault) SaveSecret(ctx context.Context, key string, data string) error
- func (k *KeyVault) SaveSecretBinary(ctx context.Context, key string, secret []byte) error
- type KeyVaultConfig
- type KeyVaultEnvironment
- type KeyVaultEnvironmentCachedFactory
- type KeyVaultEnvironmentConfig
- type KeyVaultEnvironmentFactory
- type KeyVaultFactory
- type User
Constants ¶
const AzureArmCompute = "azure-arm-compute"
const AzureCredentialsKey = "azure"
const DefaultRegion = "usgovvirginia"
const KeyVaultCachedId = "azure-keyvault-cached"
const KeyVaultId = "azure-keyvault"
Variables ¶
var AzureBlob = "azure-blob"
var AzureFiles = "azure-files"
Functions ¶
func AzureGetRequiredEnv ¶ added in v0.0.3
func AzureGetRequiredEnv() []string
func GetAzureClientSecretCredential ¶
func GetAzureClientSecretCredential(azCfg AzureCredentials) (*azidentity.ClientSecretCredential, error)
func GetStorageAccountType ¶
func IsAvailable ¶
func IsAvailable(restrictions []*armcompute.ResourceSKURestrictions) bool
func IsInLocation ¶
func LoadEnvironment ¶
func LoadEnvironment(ctx context.Context) (*cloudy.Environment, error)
func NewUsageClient ¶
func NewUsageClient(ctx context.Context, config *AzureVMControllerConfig) (*armcompute.UsageClient, error)
func NewVMClient ¶
func NewVMClient(ctx context.Context, config *AzureVMControllerConfig) (*armcompute.VirtualMachinesClient, error)
func SizeFromResource ¶
func SizeFromResource(ctx context.Context, res *armcompute.ResourceSKU) *cloudyvm.VmSize
func VMGetPowerState ¶
func VMGetPowerState(vm *armcompute.VirtualMachine) string
func VmCreate ¶
func VmCreate(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, vm *cloudyvm.VirtualMachineConfiguration) (*cloudyvm.VirtualMachineConfiguration, error)
func VmList ¶
func VmList(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, rg string) ([]*cloudyvm.VirtualMachineStatus, error)
func VmStart ¶
func VmStart(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, vmName string, resourceGroup string, wait bool) error
func VmState ¶
func VmState(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, vmAction cloudyvm.VirtualMachineAction, vmName string, resourceGroup string, wait bool) (*cloudyvm.VirtualMachineStatus, error)
func VmStatus ¶
func VmStatus(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, vmName string, resourceGroup string) (*cloudyvm.VirtualMachineStatus, error)
func VmStop ¶
func VmStop(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, vmName string, resourceGroup string, wait bool) error
func VmTerminate ¶
func VmTerminate(ctx context.Context, vmClient *armcompute.VirtualMachinesClient, vmName string, resourceGroup string, wait bool) error
Types ¶
type AVDManagerFactory ¶
type AVDManagerFactory struct {
AzureVirtualDesktop
}
func (*AVDManagerFactory) Create ¶
func (ms *AVDManagerFactory) Create(cfg interface{}) (cloudy.AVDManager, error)
func (*AVDManagerFactory) FromEnv ¶
func (ms *AVDManagerFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
type AzureBlobFileShareFactory ¶
type AzureBlobFileShareFactory struct{}
func (*AzureBlobFileShareFactory) Create ¶
func (f *AzureBlobFileShareFactory) Create(cfg interface{}) (storage.FileStorageManager, error)
func (*AzureBlobFileShareFactory) FromEnv ¶
func (f *AzureBlobFileShareFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
type AzureBlobStorageFactory ¶
type AzureBlobStorageFactory struct{}
func (*AzureBlobStorageFactory) Create ¶
func (f *AzureBlobStorageFactory) Create(cfg interface{}) (storage.ObjectStorageManager, error)
func (*AzureBlobStorageFactory) FromEnv ¶
func (f *AzureBlobStorageFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
type AzureCosmosDbDatastore ¶
type AzureCosmosDbDatastore struct { DB *Cosmosdb // contains filtered or unexported fields }
func NewAzureCosmosDb ¶
func NewAzureCosmosDb(url string, key string, database string, collection string, v interface{}) *AzureCosmosDbDatastore
func (*AzureCosmosDbDatastore) Close ¶
func (az *AzureCosmosDbDatastore) Close(ctx context.Context) error
func (*AzureCosmosDbDatastore) Delete ¶
func (az *AzureCosmosDbDatastore) Delete(ctx context.Context, key string) error
func (*AzureCosmosDbDatastore) Get ¶
func (az *AzureCosmosDbDatastore) Get(ctx context.Context, key string) (interface{}, error)
func (*AzureCosmosDbDatastore) GetAll ¶
func (az *AzureCosmosDbDatastore) GetAll(ctx context.Context) ([]interface{}, error)
func (*AzureCosmosDbDatastore) Open ¶
func (az *AzureCosmosDbDatastore) Open(ctx context.Context, config interface{}) error
func (*AzureCosmosDbDatastore) Ping ¶
func (az *AzureCosmosDbDatastore) Ping(ctx context.Context) bool
func (*AzureCosmosDbDatastore) Query ¶
func (az *AzureCosmosDbDatastore) Query(ctx context.Context, query *datastore.SimpleQuery) ([]interface{}, error)
type AzureCredentialLoader ¶
type AzureCredentialLoader struct{}
func (*AzureCredentialLoader) ReadFromEnv ¶
func (loader *AzureCredentialLoader) ReadFromEnv(env *cloudy.Environment) interface{}
type AzureCredentials ¶
func GetAzureCredentialsFromEnv ¶
func GetAzureCredentialsFromEnv(env *cloudy.Environment) AzureCredentials
type AzureFileShareFactory ¶
type AzureFileShareFactory struct{}
func (*AzureFileShareFactory) Create ¶
func (f *AzureFileShareFactory) Create(cfg interface{}) (storage.FileStorageManager, error)
func (*AzureFileShareFactory) FromEnv ¶
func (f *AzureFileShareFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
type AzureVMController ¶
type AzureVMController struct { Vault *KeyVault Client *armcompute.VirtualMachinesClient Usage *armcompute.UsageClient Config *AzureVMControllerConfig // contains filtered or unexported fields }
func NewAzureVMController ¶
func NewAzureVMController(ctx context.Context, config *AzureVMControllerConfig) (*AzureVMController, error)
func (*AzureVMController) ConfigureDiskSize ¶
func (vmc *AzureVMController) ConfigureDiskSize(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) (int32, error)
func (*AzureVMController) ConfigureVmOsDiskOsTypeType ¶
func (vmc *AzureVMController) ConfigureVmOsDiskOsTypeType(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) *armcompute.OperatingSystemTypes
func (*AzureVMController) ConfigureVmOsProfile ¶
func (vmc *AzureVMController) ConfigureVmOsProfile(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) *armcompute.OSProfile
func (*AzureVMController) Create ¶
func (vmc *AzureVMController) Create(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) (*cloudyvm.VirtualMachineConfiguration, error)
func (*AzureVMController) CreateNIC ¶
func (vmc *AzureVMController) CreateNIC(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration, subnetId string) error
CreateNIC - Creates the Network Interface for the virtual machine. It mimics the terraform code listed below. The elements used by this method are: - VM Name / ID (from vm) - Region (from factory) - Resource Group (from factory) - Subnet ID (from vm)
Once created the NIC has an ID and an IP address that we care about. The VirtualMachineConfiguration input is mutated to add the appropriate information.
az network nic create \ --resource-group go-on-azure \ --vnet-name go-on-azure-vmVNET \ --subnet go-on-azure-vmSubnet \ --name uvm-gotest-ip
resource "azurerm_network_interface" "main-nic" { name = join("-", [var.vdi-name, random_string.random.result]) location = data.azurerm_resource_group.main-rg.location resource_group_name = data.azurerm_resource_group.main-rg.name ip_configuration { name = join("-", [var.vdi-name, "IP"]) subnet_id = data.azurerm_subnet.main-subnet.id private_ip_address_allocation = "Dynamic" } }
NOT WORKING YET
func (*AzureVMController) CreateNSG ¶
func (vmc *AzureVMController) CreateNSG(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) (string, error)
data "azurerm_network_security_group" "vdi-security-group" { name = var.vdi-nsg resource_group_name = data.azurerm_resource_group.main-rg.name }
func (*AzureVMController) CreateVirtualMachine ¶
func (vmc *AzureVMController) CreateVirtualMachine(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) error
CreateVirtualMachine
resource "azurerm_linux_virtual_machine" "main-vm" { name = var.vdi-name computer_name = var.vdi-name admin_username = "salt" resource_group_name = var.app-rg-name location = var.def-location size = var.vdi-size source_image_id = "/subscriptions/${var.subscription-id}/resourceGroups/${var.app-rg-name}/providers/Microsoft.Compute/galleries/${var.source-image-gallery-name}/images/${var.source-image}/versions/${var.source-image-version}" network_interface_ids = [ azurerm_network_interface.main-nic.id, ] admin_ssh_key { username = "salt" public_key = file("${path.module}/vdi-terraform_id_rsa.pub") } os_disk { caching = "ReadWrite" storage_account_type = "Standard_LRS" } tags = { Application = "SKYBORG" "Functional Area " = "VDI" "User Principle Name" = var.user-principle-name } }
func (*AzureVMController) Delete ¶
func (vmc *AzureVMController) Delete(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) (*cloudyvm.VirtualMachineConfiguration, error)
func (*AzureVMController) DeleteVM ¶
func (vmc *AzureVMController) DeleteVM(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) error
func (*AzureVMController) DeleteVMOSDisk ¶
func (vmc *AzureVMController) DeleteVMOSDisk(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) error
func (*AzureVMController) FindBestSubnet ¶
func (vmc *AzureVMController) FindBestSubnet(ctx context.Context, availableSubnets []string) (string, error)
Finds the best subnet based on IP availabilty
func (*AzureVMController) GetAvailableIPS ¶
Finds the best subnet based on IP availabilty
func (*AzureVMController) GetLatestImageVersion ¶
func (*AzureVMController) GetLimits ¶
func (vmc *AzureVMController) GetLimits(ctx context.Context) ([]*cloudyvm.VirtualMachineLimit, error)
func (*AzureVMController) GetNIC ¶
func (vmc *AzureVMController) GetNIC(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) (*cloudyvm.VirtualMachineNetwork, error)
Find NIC if it already exists
func (*AzureVMController) GetNSG ¶
func (vmc *AzureVMController) GetNSG(ctx context.Context, name string) (*armnetwork.SecurityGroup, error)
func (*AzureVMController) GetVM ¶
func (vmc *AzureVMController) GetVM(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) (*cloudyvm.VirtualMachineConfiguration, error)
Find VM if it already exists
func (*AzureVMController) GetVMSizes ¶
func (*AzureVMController) GetVmOsDisk ¶
func (vmc *AzureVMController) GetVmOsDisk(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) (*cloudyvm.VirtualMachineDisk, error)
func (*AzureVMController) ListAll ¶
func (vmc *AzureVMController) ListAll(ctx context.Context) ([]*cloudyvm.VirtualMachineStatus, error)
func (*AzureVMController) ListWithTag ¶
func (vmc *AzureVMController) ListWithTag(ctx context.Context, tag string) ([]*cloudyvm.VirtualMachineStatus, error)
func (*AzureVMController) SetState ¶
func (vmc *AzureVMController) SetState(ctx context.Context, state cloudyvm.VirtualMachineAction, vmName string, wait bool) (*cloudyvm.VirtualMachineStatus, error)
func (*AzureVMController) Status ¶
func (vmc *AzureVMController) Status(ctx context.Context, vmName string) (*cloudyvm.VirtualMachineStatus, error)
func (*AzureVMController) ValidateConfiguration ¶
func (vmc *AzureVMController) ValidateConfiguration(ctx context.Context, vm *cloudyvm.VirtualMachineConfiguration) error
type AzureVMControllerConfig ¶
type AzureVMControllerConfig struct { AzureCredentials SubscriptionID string ResourceGroup string // ?? NetworkResourceGroup string // From Environment Variable SourceImageGalleryResourceGroup string SourceImageGalleryName string // From Environment Variable Vnet string // From Environment Variable AvailableSubnets []string // From Environment Variable NetworkSecurityGroupName string // From Environment Variable NetworkSecurityGroupID string // From Environment Variable // SaltCmd string // From Environment Variable VaultURL string DomainControllerOverride string DomainControllers []*string // From Environment Variable LogBody bool }
type AzureVMControllerFactory ¶
type AzureVMControllerFactory struct{}
func (*AzureVMControllerFactory) Create ¶
func (f *AzureVMControllerFactory) Create(cfg interface{}) (cloudyvm.VMController, error)
func (*AzureVMControllerFactory) FromEnv ¶
func (f *AzureVMControllerFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
type AzureVMSizeCache ¶
type AzureVMSizeCache struct {
// contains filtered or unexported fields
}
func (*AzureVMSizeCache) Load ¶
func (azs *AzureVMSizeCache) Load(ctx context.Context, vmc *AzureVMController) error
type AzureVirtualDesktop ¶
type AzureVirtualDesktop struct {
// contains filtered or unexported fields
}
func NewAzureVirtualDesktop ¶
func NewAzureVirtualDesktop(ctx context.Context, config AzureVirtualDesktopConfig) (*AzureVirtualDesktop, error)
func (*AzureVirtualDesktop) AssignRoleToUser ¶
func (*AzureVirtualDesktop) AssignSessionHost ¶
func (*AzureVirtualDesktop) DeleteSessionHost ¶
func (*AzureVirtualDesktop) DeleteUserSession ¶
func (*AzureVirtualDesktop) DisconnecteUserSession ¶
func (*AzureVirtualDesktop) FindFirstAvailableHostPool ¶
func (*AzureVirtualDesktop) RetrieveRegistrationToken ¶
type AzureVirtualDesktopConfig ¶
type AzureVirtualDesktopConfig struct { AzureCredentials // contains filtered or unexported fields }
type BlobContainerShare ¶
type BlobContainerShare struct {}
THe BlobContainerShare provides file shares based on the Azure Blob Storage
func NewBlobContainerShare ¶
func (*BlobContainerShare) Delete ¶
func (bfs *BlobContainerShare) Delete(ctx context.Context, key string) error
type BlobFileShare ¶
type BlobFileShare struct {}
THe BlobFileShare provides file shares based on the Azure Blob Storage
func (*BlobFileShare) Delete ¶
func (bfs *BlobFileShare) Delete(ctx context.Context, key string) error
type BlobStorage ¶
type BlobStorage struct { Account string AccountKey string Container string UrlSlug string Client *container.Client }
Object Storage
func NewBlobContainer ¶
func NewBlobContainerFrom ¶
func NewBlobContainerFrom(ctx context.Context, client *container.Client) *BlobStorage
func (*BlobStorage) Download ¶
func (b *BlobStorage) Download(ctx context.Context, key string) (io.ReadCloser, error)
func (*BlobStorage) List ¶
func (b *BlobStorage) List(ctx context.Context, prefix string) ([]*storage.StoredObject, []*storage.StoredPrefix, error)
func (*BlobStorage) ListNative ¶
func (b *BlobStorage) ListNative(ctx context.Context, prefix string) ([]*container.BlobItem, []*container.BlobPrefix, error)
func (*BlobStorage) TagsToMap ¶
func (b *BlobStorage) TagsToMap(tags *container.BlobTags) map[string]string
func (*BlobStorage) ToStoredObject ¶
func (b *BlobStorage) ToStoredObject(item *container.BlobItem) *storage.StoredObject
func (*BlobStorage) UpdateMetadata ¶ added in v0.0.5
type BlobStorageAccount ¶
type BlobStorageAccount struct { Account string AccountKey string UrlSlug string Client *azblob.Client }
ObjectStorageManager {
func NewBlobStorageAccount ¶
func (*BlobStorageAccount) Create ¶
func (sa *BlobStorageAccount) Create(ctx context.Context, key string, openToPublic bool, tags map[string]string) (storage.ObjectStorage, error)
func (*BlobStorageAccount) Delete ¶
func (sa *BlobStorageAccount) Delete(ctx context.Context, key string) error
func (*BlobStorageAccount) Get ¶
func (sa *BlobStorageAccount) Get(ctx context.Context, key string) (storage.ObjectStorage, error)
func (*BlobStorageAccount) GetBlobContainer ¶
func (sa *BlobStorageAccount) GetBlobContainer(ctx context.Context, name string) (*storage.StorageArea, error)
func (*BlobStorageAccount) GetItem ¶
func (sa *BlobStorageAccount) GetItem(ctx context.Context, key string) (*storage.StorageArea, error)
func (*BlobStorageAccount) List ¶
func (sa *BlobStorageAccount) List(ctx context.Context) ([]*storage.StorageArea, error)
type CosmosObject ¶
type CosmosObject struct { documentdb.Document Item interface{} }
type Cosmosdb ¶
type Cosmosdb struct { Database string Collection string Model interface{} // contains filtered or unexported fields }
func NewCosmosdb ¶
func (*Cosmosdb) GetRaw ¶
func (c *Cosmosdb) GetRaw(id string) (*CosmosObject, error)
Get user by given id
type KeyVault ¶
type KeyVault struct { AzureCredentials VaultURL string Client *azsecrets.Client }
func NewKeyVault ¶
func NewKeyVaultFromEnv ¶ added in v0.0.3
func NewKeyVaultFromEnv(env *cloudy.Environment) (*KeyVault, error)
func (*KeyVault) DeleteSecret ¶
func (*KeyVault) GetSecretBinary ¶
func (*KeyVault) IsConflictErr ¶
func (*KeyVault) IsNotFound ¶
func (*KeyVault) SaveSecret ¶
SaveSecret saves the secret in key vault. There are a few funny things that can happen here.
type KeyVaultConfig ¶
type KeyVaultConfig struct { AzureCredentials VaultURL string `cloudyenv:"AZ_VAULT_URL"` }
type KeyVaultEnvironment ¶
func NewKeyVaultEnvironmentService ¶
func NewKeyVaultEnvironmentService(ctx context.Context, vaultURL string, credentials AzureCredentials, prefix string) (*KeyVaultEnvironment, error)
type KeyVaultEnvironmentCachedFactory ¶
type KeyVaultEnvironmentCachedFactory struct{}
func (*KeyVaultEnvironmentCachedFactory) Create ¶
func (c *KeyVaultEnvironmentCachedFactory) Create(cfg interface{}) (cloudy.EnvironmentService, error)
func (*KeyVaultEnvironmentCachedFactory) FromEnv ¶
func (c *KeyVaultEnvironmentCachedFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
type KeyVaultEnvironmentConfig ¶
type KeyVaultEnvironmentConfig struct { AzureCredentials VaultURL string Prefix string }
type KeyVaultEnvironmentFactory ¶
type KeyVaultEnvironmentFactory struct{}
func (*KeyVaultEnvironmentFactory) Create ¶
func (c *KeyVaultEnvironmentFactory) Create(cfg interface{}) (cloudy.EnvironmentService, error)
func (*KeyVaultEnvironmentFactory) FromEnv ¶
func (c *KeyVaultEnvironmentFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
type KeyVaultFactory ¶
type KeyVaultFactory struct{}
func (*KeyVaultFactory) Create ¶
func (c *KeyVaultFactory) Create(cfg interface{}) (secrets.SecretProvider, error)
func (*KeyVaultFactory) FromEnv ¶
func (c *KeyVaultFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
func (*KeyVaultFactory) ListRequiredEnv ¶ added in v0.0.3
func (c *KeyVaultFactory) ListRequiredEnv(env *cloudy.Environment) []string