Documentation
¶
Index ¶
- Constants
- Variables
- func AzureGetRequiredEnv() []string
- func ExtractResourceGroupFromID(ctx context.Context, id string) string
- func FromCloudyVirtualMachine(ctx context.Context, cloudyVM *models.VirtualMachine) armcompute.VirtualMachine
- func FromStrPointerMap(pointerMap map[string]*string) map[string]string
- func GenerateNextName(suffixes []string, maxSequences int) (string, error)
- 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 LongIdToShortId(longId string) string
- func NewAzureCredentials(azcred *AzureCredentials) (azcore.TokenCredential, error)
- func NewAzureVirtualMachineManager(ctx context.Context, credentials *AzureCredentials, ...) (cloudyvm.VirtualMachineManager, error)
- func PolicyFromCloudString(cloudName string) cloud.Configuration
- func SizeFromResource(ctx context.Context, res *armcompute.ResourceSKU) *cloudyvm.VmSize
- func ToCloudyVirtualMachine(ctx context.Context, azVM *armcompute.VirtualMachine) *models.VirtualMachine
- func ToCloudyVirtualMachineLocation(location *string) *models.VirtualMachineLocation
- func ToCloudyVirtualMachineSize(ctx context.Context, resource *armcompute.ResourceSKU) *models.VirtualMachineSize
- func ToStrPointerMap(stringMap map[string]string) map[string]*string
- func UpdateCloudyVirtualMachine(vm *models.VirtualMachine, responseVirtualMachine armcompute.VirtualMachine) error
- func VMAddTag(ctx context.Context)
- func VMGetPowerState(vm *armcompute.VirtualMachine) string
- 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) DeleteAll(ctx context.Context, key []string) error
- func (az *AzureCosmosDbDatastore) Exists(ctx context.Context, key string) (bool, error)
- func (az *AzureCosmosDbDatastore) Get(ctx context.Context, id string) ([]byte, error)
- func (az *AzureCosmosDbDatastore) GetAll(ctx context.Context) ([][]byte, error)
- func (az *AzureCosmosDbDatastore) OnCreate(fn func(ctx context.Context, ds datastore.UntypedJsonDataStore) 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) ([][]byte, error)
- func (az *AzureCosmosDbDatastore) QueryAndUpdate(ctx context.Context, ds *datastore.SimpleQuery, ...) ([][]byte, error)
- func (az *AzureCosmosDbDatastore) QueryAsMap(ctx context.Context, ds *datastore.SimpleQuery) ([]map[string]any, error)
- func (az *AzureCosmosDbDatastore) QueryTable(ctx context.Context, ds *datastore.SimpleQuery) ([][]interface{}, error)
- func (az *AzureCosmosDbDatastore) Save(ctx context.Context, data []byte, key string) error
- func (az *AzureCosmosDbDatastore) SaveAll(ctx context.Context, b [][]byte, s []string) error
- type AzureCredentialLoader
- type AzureCredentials
- type AzureFileShareFactory
- type AzureStorageAccount
- 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 AzureVirtualDesktopConfig
- type AzureVirtualDesktopManager
- func (avd *AzureVirtualDesktopManager) AssignGroupToDesktopAppGroup(ctx context.Context, desktopAppGroupName string) error
- func (avd *AzureVirtualDesktopManager) AssignRoleToUser(ctx context.Context, rgName string, roleid string, upn string) error
- func (avd *AzureVirtualDesktopManager) AssignSessionHost(ctx context.Context, rgName string, hpName string, shName string, ...) error
- func (avd *AzureVirtualDesktopManager) CanAssignUserToHostPool(ctx context.Context, rgName, hostPoolName, userName string) (bool, error)
- func (avd *AzureVirtualDesktopManager) Configure(ctx context.Context) error
- func (avd *AzureVirtualDesktopManager) CreateApplicationGroup(ctx context.Context, rgName, suffix string) (*armdesktopvirtualization.ApplicationGroup, error)
- func (avd *AzureVirtualDesktopManager) CreateHostPool(ctx context.Context, rgName, suffix string) (*armdesktopvirtualization.HostPool, error)
- func (avd *AzureVirtualDesktopManager) CreateWorkspace(ctx context.Context, rgName, suffix, appGroupName string) (*armdesktopvirtualization.Workspace, error)
- func (avd *AzureVirtualDesktopManager) DeleteSessionHost(ctx context.Context, rgName string, hpname string, sessionhost string) error
- func (avd *AzureVirtualDesktopManager) DeleteUserSession(ctx context.Context, rgName string, hpname string, sessionHost string, ...) error
- func (avd *AzureVirtualDesktopManager) DisconnecteUserSession(ctx context.Context, rgName string, hpname string, sessionHost string, ...) error
- func (avd *AzureVirtualDesktopManager) FindFirstAvailableHostPool(ctx context.Context, rgName string, upn string) (*armdesktopvirtualization.HostPool, error)
- func (avd *AzureVirtualDesktopManager) FindSessionHostByVMNameInHostPool(ctx context.Context, rgName string, hostPoolName string, vmID string) (*armdesktopvirtualization.SessionHost, error)
- func (avd *AzureVirtualDesktopManager) GetAllDesktopApplications(ctx context.Context, rgName string) ([]string, error)
- func (avd *AzureVirtualDesktopManager) GetDesktopApplicationGroupFromHostpool(ctx context.Context, rgName string, hpName string) (*armdesktopvirtualization.ApplicationGroup, error)
- func (avd *AzureVirtualDesktopManager) GetDesktopApplicationObjectIDFromAppGroup(ctx context.Context, rgName string, ...) (string, error)
- func (avd *AzureVirtualDesktopManager) GetRegistrationScript(ctx context.Context, vm *models.VirtualMachine, registrationToken string) (*string, error)
- func (avd *AzureVirtualDesktopManager) GetWorkspaceByName(ctx context.Context, rgName string, workspaceName string) (*armdesktopvirtualization.Workspace, error)
- func (avd *AzureVirtualDesktopManager) PostRegister(ctx context.Context, vm *models.VirtualMachine, hpName string) (*models.VirtualMachine, error)
- func (avd *AzureVirtualDesktopManager) PreRegister(ctx context.Context, vm *models.VirtualMachine) (hostPoolName, token *string, err error)
- func (avd *AzureVirtualDesktopManager) RetrieveRegistrationToken(ctx context.Context, rgName string, hpname string) (*string, error)
- func (avd *AzureVirtualDesktopManager) WaitForSessionHost(ctx context.Context, rgName, hpName, vmID string, timeout time.Duration) (*armdesktopvirtualization.SessionHost, error)
- type AzureVirtualMachineManager
- func (vmm *AzureVirtualMachineManager) Configure(ctx context.Context) error
- func (vmm *AzureVirtualMachineManager) Create(ctx context.Context, vm *models.VirtualMachine) (*models.VirtualMachine, error)
- func (vmm *AzureVirtualMachineManager) CreateNic(ctx context.Context, vm *models.VirtualMachine) (*models.VirtualMachineNic, error)
- func (vmm *AzureVirtualMachineManager) Deallocate(ctx context.Context, vmName string) error
- func (vmm *AzureVirtualMachineManager) Delete(ctx context.Context, vmId string) error
- func (vmm *AzureVirtualMachineManager) DeleteDisk(ctx context.Context, diskName string) error
- func (vmm *AzureVirtualMachineManager) DeleteNic(ctx context.Context, nic *models.VirtualMachineNic) error
- func (vmm *AzureVirtualMachineManager) DeleteNics(ctx context.Context, nics []*models.VirtualMachineNic) error
- func (vmm *AzureVirtualMachineManager) GetAll(ctx context.Context, filter string, attrs []string, includeState bool) (*[]models.VirtualMachine, error)
- func (vmm *AzureVirtualMachineManager) GetAllDisks(ctx context.Context) ([]*models.VirtualMachineDisk, error)
- func (vmm *AzureVirtualMachineManager) GetAllNics(ctx context.Context) ([]*models.VirtualMachineNic, error)
- func (vmm *AzureVirtualMachineManager) GetAllSizes(ctx context.Context) (map[string]*models.VirtualMachineSize, error)
- func (vmm *AzureVirtualMachineManager) GetAllVmDisks(ctx context.Context, vmId string) ([]*models.VirtualMachineDisk, error)
- func (vmm *AzureVirtualMachineManager) GetById(ctx context.Context, id string, includeState bool) (*models.VirtualMachine, error)
- func (vmm *AzureVirtualMachineManager) GetLatestImageVersion(ctx context.Context, imageName string) (string, error)
- func (vmm *AzureVirtualMachineManager) GetNics(ctx context.Context, vmId string) ([]*models.VirtualMachineNic, error)
- func (vmm *AzureVirtualMachineManager) GetOsDisk(ctx context.Context, vmId string) (*models.VirtualMachineDisk, error)
- func (vmm *AzureVirtualMachineManager) GetSizesForTemplate(ctx context.Context, template models.VirtualMachineTemplate) (matches map[string]*models.VirtualMachineSize, ...)
- func (vmm *AzureVirtualMachineManager) GetSizesWithUsage(ctx context.Context) (map[string]*models.VirtualMachineSize, error)
- func (vmm *AzureVirtualMachineManager) GetUsage(ctx context.Context) (map[string]models.VirtualMachineFamily, error)
- func (vmm *AzureVirtualMachineManager) RunCommand(ctx context.Context, vmId string, script string) error
- func (vmm *AzureVirtualMachineManager) RunPowershell(ctx context.Context, vmID, script string) error
- func (vmm *AzureVirtualMachineManager) Start(ctx context.Context, vmName string) error
- func (vmm *AzureVirtualMachineManager) Stop(ctx context.Context, vmName string) error
- func (vmm *AzureVirtualMachineManager) Update(ctx context.Context, vm *models.VirtualMachine) (*models.VirtualMachine, error)
- 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) 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) GenDownloadURL(ctx context.Context, key string) (string, error)
- func (b *BlobStorage) GenUploadURL(ctx context.Context, key string) (string, 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 CosmosDBFactory
- func (c *CosmosDBFactory) Create(cfg interface{}) (datastore.UntypedJsonDataStoreFactory, error)
- func (c *CosmosDBFactory) CreateJsonDatastore(ctx context.Context, typename string, prefix string, idField string) datastore.UntypedJsonDataStore
- func (c *CosmosDBFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
- type CosmosDbQueryConverter
- func (qc *CosmosDbQueryConverter) Convert(c *datastore.SimpleQuery, table string) string
- func (qc *CosmosDbQueryConverter) ConvertASort(c *datastore.SortBy) string
- func (qc *CosmosDbQueryConverter) ConvertCondition(c *datastore.SimpleQueryCondition) string
- func (qc *CosmosDbQueryConverter) ConvertConditionGroup(cg *datastore.SimpleQueryConditionGroup) string
- func (qc *CosmosDbQueryConverter) ConvertSelect(c *datastore.SimpleQuery, table string) string
- func (qc *CosmosDbQueryConverter) ConvertSort(sortbys []*datastore.SortBy) string
- func (qc *CosmosDbQueryConverter) ToColumnName(name string) string
- type CosmosFactoryConfig
- type CosmosObject
- type Cosmosdb
- func (c *Cosmosdb) Add(ctx context.Context, id string, data []byte) error
- func (c *Cosmosdb) AddPK(data []byte) ([]byte, error)
- func (c *Cosmosdb) CreateOpen(ctx context.Context, ...) error
- func (c *Cosmosdb) Exists(ctx context.Context, id string) (bool, error)
- func (c *Cosmosdb) GetAll(ctx context.Context) ([][]byte, error)
- func (c *Cosmosdb) GetRaw(ctx context.Context, id string) ([]byte, error)
- func (c *Cosmosdb) Healthy(ctx context.Context) error
- func (c *Cosmosdb) IsStatusCodeNotFound(err error) bool
- func (c *Cosmosdb) QueryAll(ctx context.Context, query string) ([][]byte, error)
- func (c *Cosmosdb) Remove(ctx context.Context, id string) error
- func (c *Cosmosdb) Replace(ctx context.Context, id string, data []byte) error
- func (c *Cosmosdb) Upsert(ctx context.Context, id string, data []byte) error
- type KeyVault
- func (k *KeyVault) Configure(ctx context.Context) error
- func (k *KeyVault) DeleteSecret(ctx context.Context, key string) error
- func (k *KeyVault) GetAllSecrets(ctx context.Context) (map[string]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 KeyVaultKvConfig
- type KeyVaultKvStore
- func (kve *KeyVaultKvStore) Delete(key string) error
- func (kve *KeyVaultKvStore) Get(key string) (string, error)
- func (kve *KeyVaultKvStore) GetAll() (map[string]string, error)
- func (kve *KeyVaultKvStore) GetSecure(key string) (strfmt.Password, error)
- func (kve *KeyVaultKvStore) Set(key string, value string) error
- func (kve *KeyVaultKvStore) SetMany(items map[string]string) error
- func (kve *KeyVaultKvStore) SetSecure(key string, value strfmt.Password) error
- type ScoredVMSize
- type VirtualMachineManagerConfig
Constants ¶
const ( CredTypeCli = "cli" CredTypeDevCli = "devcli" CredTypeSecret = "secret" CredTypeCode = "devicecode" CredTypeDefault = "default" CredTypeEnv = "env" CredTypeBrowser = "browser" CredTypeManaged = "managed" CredTypeOther = "other" )
const ( CloudPublic = "public" CloudUSGovernment = "usgovernment" CloudAzureUSGovernment = "azureusgovernment" )
const AzureArmCompute = "azure-arm-compute"
const AzureCosmosDB = "azure-cosmosdb"
FACTORY --------------------------------
const AzureCredentialsKey = "azure"
const DefaultRegion = "usgovvirginia"
const KeyVaultCachedId = "azure-keyvault-cached"
const KeyVaultId = "azure-keyvault"
const (
MIN_WINDOWS_OS_DISK_SIZE = 200
)
Variables ¶
var AzureBlob = "azure-blob"
var AzureFiles = "azure-files"
var DefaultTransport policy.Transporter
Functions ¶
func AzureGetRequiredEnv ¶ added in v0.0.3
func AzureGetRequiredEnv() []string
func FromCloudyVirtualMachine ¶ added in v0.0.16
func FromCloudyVirtualMachine(ctx context.Context, cloudyVM *models.VirtualMachine) armcompute.VirtualMachine
func GenerateNextName ¶ added in v0.0.30
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 LongIdToShortId ¶ added in v0.0.25
func NewAzureCredentials ¶ added in v0.0.16
func NewAzureCredentials(azcred *AzureCredentials) (azcore.TokenCredential, error)
func NewAzureVirtualMachineManager ¶ added in v0.0.16
func NewAzureVirtualMachineManager(ctx context.Context, credentials *AzureCredentials, config *VirtualMachineManagerConfig) (cloudyvm.VirtualMachineManager, error)
func PolicyFromCloudString ¶ added in v0.0.30
func PolicyFromCloudString(cloudName string) cloud.Configuration
func SizeFromResource ¶
func SizeFromResource(ctx context.Context, res *armcompute.ResourceSKU) *cloudyvm.VmSize
func ToCloudyVirtualMachine ¶ added in v0.0.16
func ToCloudyVirtualMachine(ctx context.Context, azVM *armcompute.VirtualMachine) *models.VirtualMachine
func ToCloudyVirtualMachineLocation ¶ added in v0.0.16
func ToCloudyVirtualMachineLocation(location *string) *models.VirtualMachineLocation
func ToCloudyVirtualMachineSize ¶ added in v0.0.16
func ToCloudyVirtualMachineSize(ctx context.Context, resource *armcompute.ResourceSKU) *models.VirtualMachineSize
func UpdateCloudyVirtualMachine ¶ added in v0.0.16
func UpdateCloudyVirtualMachine(vm *models.VirtualMachine, responseVirtualMachine armcompute.VirtualMachine) error
func VMGetPowerState ¶
func VMGetPowerState(vm *armcompute.VirtualMachine) string
Types ¶
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 (*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) DeleteAll ¶ added in v0.0.16
func (az *AzureCosmosDbDatastore) DeleteAll(ctx context.Context, key []string) error
func (*AzureCosmosDbDatastore) GetAll ¶
func (az *AzureCosmosDbDatastore) GetAll(ctx context.Context) ([][]byte, error)
func (*AzureCosmosDbDatastore) OnCreate ¶ added in v0.0.16
func (az *AzureCosmosDbDatastore) OnCreate(fn func(ctx context.Context, ds datastore.UntypedJsonDataStore) 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) ([][]byte, error)
func (*AzureCosmosDbDatastore) QueryAndUpdate ¶ added in v0.0.16
func (*AzureCosmosDbDatastore) QueryAsMap ¶ added in v0.0.16
func (az *AzureCosmosDbDatastore) QueryAsMap(ctx context.Context, ds *datastore.SimpleQuery) ([]map[string]any, error)
func (*AzureCosmosDbDatastore) QueryTable ¶ added in v0.0.16
func (az *AzureCosmosDbDatastore) QueryTable(ctx context.Context, ds *datastore.SimpleQuery) ([][]interface{}, error)
type AzureCredentialLoader ¶
type AzureCredentialLoader struct{}
func (*AzureCredentialLoader) ReadFromEnv ¶
func (loader *AzureCredentialLoader) ReadFromEnv(env *cloudy.Environment) interface{}
type AzureCredentials ¶
type AzureCredentials struct {
Type string // Can be any type of CredType*
Region string // e.g. "usgovvirginia"
TenantID string
ClientID string
ClientSecret string
ResourceGroup string
SubscriptionID string
Cloud string // e.g. azureusgovernment
}
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 AzureStorageAccount ¶ added in v0.0.16
type AzureStorageAccount struct {
AzureCredentials
ServiceURL string
UrlSlug string
AccountName string
AccountKey string
}
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 AzureVirtualDesktopManager ¶ added in v0.0.30
type AzureVirtualDesktopManager struct {
// contains filtered or unexported fields
}
func NewAzureVirtualDesktopManager ¶ added in v0.0.30
func NewAzureVirtualDesktopManager(ctx context.Context, credentials *AzureCredentials, config *AzureVirtualDesktopConfig) (*AzureVirtualDesktopManager, error)
func (*AzureVirtualDesktopManager) AssignGroupToDesktopAppGroup ¶ added in v0.0.30
func (avd *AzureVirtualDesktopManager) AssignGroupToDesktopAppGroup(ctx context.Context, desktopAppGroupName string) error
func (*AzureVirtualDesktopManager) AssignRoleToUser ¶ added in v0.0.30
func (*AzureVirtualDesktopManager) AssignSessionHost ¶ added in v0.0.30
func (avd *AzureVirtualDesktopManager) AssignSessionHost(ctx context.Context, rgName string, hpName string, shName string, userobjectid string) error
Assigns a User to a session host
func (*AzureVirtualDesktopManager) CanAssignUserToHostPool ¶ added in v0.0.30
func (avd *AzureVirtualDesktopManager) CanAssignUserToHostPool(ctx context.Context, rgName, hostPoolName, userName string) (bool, error)
CanAssignUserToHostPool checks if the specified user is already assigned to a session host in the given host pool.
func (*AzureVirtualDesktopManager) Configure ¶ added in v0.0.30
func (avd *AzureVirtualDesktopManager) Configure(ctx context.Context) error
func (*AzureVirtualDesktopManager) CreateApplicationGroup ¶ added in v0.0.30
func (avd *AzureVirtualDesktopManager) CreateApplicationGroup(ctx context.Context, rgName, suffix string) (*armdesktopvirtualization.ApplicationGroup, error)
CreateApplicationGroup creates an application group for the given host pool.
func (*AzureVirtualDesktopManager) CreateHostPool ¶ added in v0.0.30
func (avd *AzureVirtualDesktopManager) CreateHostPool(ctx context.Context, rgName, suffix string) (*armdesktopvirtualization.HostPool, error)
CreateHostPool creates a new host pool.
func (*AzureVirtualDesktopManager) CreateWorkspace ¶ added in v0.0.30
func (avd *AzureVirtualDesktopManager) CreateWorkspace(ctx context.Context, rgName, suffix, appGroupName string) (*armdesktopvirtualization.Workspace, error)
CreateWorkspace creates a new workspace for the given host pool.
func (*AzureVirtualDesktopManager) DeleteSessionHost ¶ added in v0.0.30
func (*AzureVirtualDesktopManager) DeleteUserSession ¶ added in v0.0.30
func (*AzureVirtualDesktopManager) DisconnecteUserSession ¶ added in v0.0.30
func (*AzureVirtualDesktopManager) FindFirstAvailableHostPool ¶ added in v0.0.30
func (*AzureVirtualDesktopManager) FindSessionHostByVMNameInHostPool ¶ added in v0.0.30
func (avd *AzureVirtualDesktopManager) FindSessionHostByVMNameInHostPool(ctx context.Context, rgName string, hostPoolName string, vmID string) (*armdesktopvirtualization.SessionHost, error)
Searches for a session host with a name that contains the VMs ID
func (*AzureVirtualDesktopManager) GetAllDesktopApplications ¶ added in v0.0.30
func (*AzureVirtualDesktopManager) GetDesktopApplicationGroupFromHostpool ¶ added in v0.0.30
func (avd *AzureVirtualDesktopManager) GetDesktopApplicationGroupFromHostpool(ctx context.Context, rgName string, hpName string) (*armdesktopvirtualization.ApplicationGroup, error)
Given a Host Pool, finds the Desktop Application Group linked to it
func (*AzureVirtualDesktopManager) GetDesktopApplicationObjectIDFromAppGroup ¶ added in v0.0.30
func (*AzureVirtualDesktopManager) GetRegistrationScript ¶ added in v0.0.30
func (avd *AzureVirtualDesktopManager) GetRegistrationScript(ctx context.Context, vm *models.VirtualMachine, registrationToken string) (*string, error)
func (*AzureVirtualDesktopManager) GetWorkspaceByName ¶ added in v0.0.30
func (*AzureVirtualDesktopManager) PostRegister ¶ added in v0.0.30
func (avd *AzureVirtualDesktopManager) PostRegister(ctx context.Context, vm *models.VirtualMachine, hpName string) (*models.VirtualMachine, error)
After registering, the user must then be assigned to the new session host
func (*AzureVirtualDesktopManager) PreRegister ¶ added in v0.0.30
func (avd *AzureVirtualDesktopManager) PreRegister(ctx context.Context, vm *models.VirtualMachine) (hostPoolName, token *string, err error)
Prior to VM registration, this process generates a token for a given host pool. This token will later be used in the registration process to join the VM to the host pool The user is also assigned to the related desktop application group.
func (*AzureVirtualDesktopManager) RetrieveRegistrationToken ¶ added in v0.0.30
func (*AzureVirtualDesktopManager) WaitForSessionHost ¶ added in v0.0.30
func (avd *AzureVirtualDesktopManager) WaitForSessionHost(ctx context.Context, rgName, hpName, vmID string, timeout time.Duration) (*armdesktopvirtualization.SessionHost, error)
WaitForSessionHost waits for a VM to appear as a session host in a specified host pool and ensures its status is 'Available'.
type AzureVirtualMachineManager ¶ added in v0.0.16
type AzureVirtualMachineManager struct {
LogBody bool
// contains filtered or unexported fields
}
func (*AzureVirtualMachineManager) Configure ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) Configure(ctx context.Context) error
func (*AzureVirtualMachineManager) Create ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) Create(ctx context.Context, vm *models.VirtualMachine) (*models.VirtualMachine, error)
func (*AzureVirtualMachineManager) CreateNic ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) CreateNic(ctx context.Context, vm *models.VirtualMachine) (*models.VirtualMachineNic, error)
func (*AzureVirtualMachineManager) Deallocate ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) Deallocate(ctx context.Context, vmName string) error
func (*AzureVirtualMachineManager) Delete ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) Delete(ctx context.Context, vmId string) error
func (*AzureVirtualMachineManager) DeleteDisk ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) DeleteDisk(ctx context.Context, diskName string) error
func (*AzureVirtualMachineManager) DeleteNic ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) DeleteNic(ctx context.Context, nic *models.VirtualMachineNic) error
func (*AzureVirtualMachineManager) DeleteNics ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) DeleteNics(ctx context.Context, nics []*models.VirtualMachineNic) error
func (*AzureVirtualMachineManager) GetAll ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) GetAll(ctx context.Context, filter string, attrs []string, includeState bool) (*[]models.VirtualMachine, error)
Queries Azure for the details of all VMs.
If includeState is true, this will also retrieve the state of the VMs (running, stopped, etc.) If includeState is false, vm.State will be an empty string
func (*AzureVirtualMachineManager) GetAllDisks ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) GetAllDisks(ctx context.Context) ([]*models.VirtualMachineDisk, error)
func (*AzureVirtualMachineManager) GetAllNics ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) GetAllNics(ctx context.Context) ([]*models.VirtualMachineNic, error)
func (*AzureVirtualMachineManager) GetAllSizes ¶ added in v0.0.18
func (vmm *AzureVirtualMachineManager) GetAllSizes(ctx context.Context) (map[string]*models.VirtualMachineSize, error)
func (*AzureVirtualMachineManager) GetAllVmDisks ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) GetAllVmDisks(ctx context.Context, vmId string) ([]*models.VirtualMachineDisk, error)
func (*AzureVirtualMachineManager) GetById ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) GetById(ctx context.Context, id string, includeState bool) (*models.VirtualMachine, error)
Queries Azure for the details of a single VM.
If includeState is true, this will also retrieve the state of the VM (running, stopped, etc.) If includeState is false, vm.State will be an empty string
func (*AzureVirtualMachineManager) GetLatestImageVersion ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) GetLatestImageVersion(ctx context.Context, imageName string) (string, error)
This function was unused in v1 It would need the config to have the source image gallery name in it
func (*AzureVirtualMachineManager) GetNics ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) GetNics(ctx context.Context, vmId string) ([]*models.VirtualMachineNic, error)
func (*AzureVirtualMachineManager) GetOsDisk ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) GetOsDisk(ctx context.Context, vmId string) (*models.VirtualMachineDisk, error)
func (*AzureVirtualMachineManager) GetSizesForTemplate ¶ added in v0.0.18
func (vmm *AzureVirtualMachineManager) GetSizesForTemplate(ctx context.Context, template models.VirtualMachineTemplate) ( matches map[string]*models.VirtualMachineSize, worse map[string]*models.VirtualMachineSize, better map[string]*models.VirtualMachineSize, err error)
func (*AzureVirtualMachineManager) GetSizesWithUsage ¶ added in v0.0.18
func (vmm *AzureVirtualMachineManager) GetSizesWithUsage(ctx context.Context) (map[string]*models.VirtualMachineSize, error)
func (*AzureVirtualMachineManager) GetUsage ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) GetUsage(ctx context.Context) (map[string]models.VirtualMachineFamily, error)
func (*AzureVirtualMachineManager) RunCommand ¶ added in v0.0.30
func (*AzureVirtualMachineManager) RunPowershell ¶ added in v0.0.30
func (vmm *AzureVirtualMachineManager) RunPowershell(ctx context.Context, vmID, script string) error
func (*AzureVirtualMachineManager) Start ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) Start(ctx context.Context, vmName string) error
func (*AzureVirtualMachineManager) Stop ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) Stop(ctx context.Context, vmName string) error
func (*AzureVirtualMachineManager) Update ¶ added in v0.0.16
func (vmm *AzureVirtualMachineManager) Update(ctx context.Context, vm *models.VirtualMachine) (*models.VirtualMachine, error)
type BlobContainerShare ¶
THe BlobContainerShare provides file shares based on the Azure Blob Storage
func NewBlobContainerShare ¶
func NewBlobContainerShare2 ¶ added in v0.0.16
func NewBlobContainerShare2(ctx context.Context, acct *AzureStorageAccount) (*BlobContainerShare, error)
func (*BlobContainerShare) Delete ¶
func (bfs *BlobContainerShare) Delete(ctx context.Context, key string) error
type BlobFileShare ¶
type BlobFileShare struct {
// Credentials AzureCredentials
}
THe BlobFileShare provides file shares based on the Azure Blob Storage
func NewAzureFileShare ¶ added in v0.0.16
func NewAzureFileShare(ctx context.Context, acct *AzureStorageAccount) (*BlobFileShare, error)
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) GenDownloadURL ¶ added in v0.0.16
func (*BlobStorage) GenUploadURL ¶ added in v0.0.16
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 NewBlobStorageAccount2 ¶ added in v0.0.16
func NewBlobStorageAccount2(ctx context.Context, acct *AzureStorageAccount) (*BlobStorageAccount, error)
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 CosmosDBFactory ¶ added in v0.0.16
type CosmosDBFactory struct {
// contains filtered or unexported fields
}
func (*CosmosDBFactory) Create ¶ added in v0.0.16
func (c *CosmosDBFactory) Create(cfg interface{}) (datastore.UntypedJsonDataStoreFactory, error)
func (*CosmosDBFactory) CreateJsonDatastore ¶ added in v0.0.16
func (c *CosmosDBFactory) CreateJsonDatastore(ctx context.Context, typename string, prefix string, idField string) datastore.UntypedJsonDataStore
func (*CosmosDBFactory) FromEnv ¶ added in v0.0.16
func (c *CosmosDBFactory) FromEnv(env *cloudy.Environment) (interface{}, error)
type CosmosDbQueryConverter ¶ added in v0.0.16
type CosmosDbQueryConverter struct {
// contains filtered or unexported fields
}
func (*CosmosDbQueryConverter) Convert ¶ added in v0.0.16
func (qc *CosmosDbQueryConverter) Convert(c *datastore.SimpleQuery, table string) string
func (*CosmosDbQueryConverter) ConvertASort ¶ added in v0.0.16
func (qc *CosmosDbQueryConverter) ConvertASort(c *datastore.SortBy) string
func (*CosmosDbQueryConverter) ConvertCondition ¶ added in v0.0.16
func (qc *CosmosDbQueryConverter) ConvertCondition(c *datastore.SimpleQueryCondition) string
func (*CosmosDbQueryConverter) ConvertConditionGroup ¶ added in v0.0.16
func (qc *CosmosDbQueryConverter) ConvertConditionGroup(cg *datastore.SimpleQueryConditionGroup) string
func (*CosmosDbQueryConverter) ConvertSelect ¶ added in v0.0.16
func (qc *CosmosDbQueryConverter) ConvertSelect(c *datastore.SimpleQuery, table string) string
func (*CosmosDbQueryConverter) ConvertSort ¶ added in v0.0.16
func (qc *CosmosDbQueryConverter) ConvertSort(sortbys []*datastore.SortBy) string
func (*CosmosDbQueryConverter) ToColumnName ¶ added in v0.0.16
func (qc *CosmosDbQueryConverter) ToColumnName(name string) string
type CosmosFactoryConfig ¶ added in v0.0.16
type CosmosFactoryConfig struct {
URL string
Key string
Creds *AzureCredentials
Database string
}
type CosmosObject ¶
type CosmosObject struct {
Item interface{}
}
type Cosmosdb ¶
func NewCosmosdb ¶
func (*Cosmosdb) CreateOpen ¶ added in v0.0.16
func (*Cosmosdb) IsStatusCodeNotFound ¶ added in v0.0.16
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) GetAllSecrets ¶ added in v0.0.16
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
type KeyVaultKvConfig ¶ added in v0.0.16
type KeyVaultKvConfig struct {
AzureCredentials
VaultURL string
Prefix string
}
type KeyVaultKvStore ¶ added in v0.0.16
func NewAzureKeyVault ¶ added in v0.0.16
func NewAzureKeyVault(ctx context.Context, cfg *KeyVaultKvConfig) (*KeyVaultKvStore, error)
func NewKeyVaultKvStoreService ¶ added in v0.0.16
func NewKeyVaultKvStoreService(ctx context.Context, vaultURL string, credentials AzureCredentials, prefix string) (*KeyVaultKvStore, error)
func (*KeyVaultKvStore) Delete ¶ added in v0.0.16
func (kve *KeyVaultKvStore) Delete(key string) error
func (*KeyVaultKvStore) Get ¶ added in v0.0.16
func (kve *KeyVaultKvStore) Get(key string) (string, error)
func (*KeyVaultKvStore) GetAll ¶ added in v0.0.16
func (kve *KeyVaultKvStore) GetAll() (map[string]string, error)
func (*KeyVaultKvStore) GetSecure ¶ added in v0.0.16
func (kve *KeyVaultKvStore) GetSecure(key string) (strfmt.Password, error)
func (*KeyVaultKvStore) Set ¶ added in v0.0.16
func (kve *KeyVaultKvStore) Set(key string, value string) error
type ScoredVMSize ¶ added in v0.0.18
type ScoredVMSize struct {
Score float64
Size *models.VirtualMachineSize
}
type VirtualMachineManagerConfig ¶ added in v0.0.16
Source Files
¶
- auth.go
- avd.go
- avdManager.go
- az-credentials.go
- az-vm-create.go
- azure-documentdb-storage.go
- cosmos-db.go
- keyvault-discovery.go
- keyvault-environment.go
- keyvault-kv.go
- keyvault.go
- storage-accounts.go
- storage-blob-fileshare.go
- storage-blob.go
- storage-fileshare.go
- util.go
- virtualMachineManager.go
- virtualMachineManagerConfig.go
- virtualMachineManagerCreate.go
- virtualMachineManagerDelete.go
- virtualMachineManagerDisk.go
- virtualMachineManagerGet.go
- virtualMachineManagerGetSizes.go
- virtualMachineManagerNetwork.go
- virtualMachineManagerRunCommand.go
- virtualMachineManagerUtilities.go
- vm-connnection.go
- vm-status.go