e2etest

package
v10.24.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 26, 2024 License: MIT Imports: 68 Imported by: 0

Documentation

Index

Constants

View Source
const (
	ARMStatusSucceeded    = "Succeeded"
	ARMStatusFailed       = "Failed"
	ARMStatusCanceled     = "Canceled"
	ARMStatusInProgress   = "InProgress"
	ARMStatusRunning      = "Running"
	ARMStatusResolvingDNS = "ResolvingDNS"
)
View Source
const (
	PrimaryStandardAcct string = "PrimaryStandard"
	PrimaryHNSAcct      string = "PrimaryHNS"
)
View Source
const (
	ARMManagedDiskCreateOptionAttach               = "Attach"
	ARMManagedDiskCreateOptionCopy                 = "Copy"
	ARMManagedDiskCreateOptionCopyStart            = "CopyStart"
	ARMManagedDiskCreateOptionEmpty                = "Empty"
	ARMManagedDiskCreateOptionFromImage            = "FromImage"
	ARMManagedDiskCreateOptionImport               = "Import"
	ARMManagedDiskCreateOptionImportSecure         = "ImportSecure"
	ARMManagedDiskCreateOptionRestore              = "Restore"
	ARMManagedDiskCreateOptionUpload               = "Upload"
	ARMManagedDiskCreateOptionUploadPreparedSecure = "UploadPreparedSecure"
)
View Source
const (
	ARMStorageAccountExpandGeoReplicationStats = "geoReplicationStats"
	ARMStorageAccountExpandBlobRestoreStatus   = "blobRestoreStatus"
)
View Source
const (
	ARMStorageAccountKeyPermissionReadOnly = "Read"
	ARMStorageAccountKeyPermissionFull     = "Full"
)
View Source
const (
	AzureManagementResource = "https://management.core.windows.net/.default"
	AzureStorageResource    = "https://storage.azure.com/.default"
	AzureDisksResource      = "https://disk.azure.com/.default"
)

Variables

View Source
var (
	ARMManagedDiskSkuPremiumLrs     = ARMManagedDiskSku{Name: "Premium_LRS"}
	ARMManagedDiskSkuPremiumZrs     = ARMManagedDiskSku{Name: "Premium_ZRS"}
	ARMManagedDiskSkuStandardSsdLrs = ARMManagedDiskSku{Name: "StandardSSD_LRS"}
	ARMManagedDiskSkuStandardSsdZrs = ARMManagedDiskSku{Name: "StandardSSD_ZRS"}
	ARMManagedDiskSkuStandardLrs    = ARMManagedDiskSku{Name: "Standard_LRS"}
	ARMManagedDiskSkuUltraSsdLrs    = ARMManagedDiskSku{Name: "UltraSSD_LRS"}
)
View Source
var (
	// SKU names https://learn.microsoft.com/en-us/rest/api/storagerp/storage-accounts/create?tabs=HTTP#skuname
	ARMStorageAccountSKUPremiumLRS     = ARMStorageAccountSKU{"Premium_LRS", "Premium"}
	ARMStorageAccountSKUPremiumZRS     = ARMStorageAccountSKU{"Premium_ZRS", "Premium"}
	ARMStorageAccountSKUStandardGRS    = ARMStorageAccountSKU{"Standard_GRS", "Standard"}
	ARMStorageAccountSKUStandardGZRS   = ARMStorageAccountSKU{"Standard_GZRS", "Standard"}
	ARMStorageAccountSKUStandardLRS    = ARMStorageAccountSKU{"Standard_LRS", "Standard"}
	ARMStorageAccountSKUStandardRAGRS  = ARMStorageAccountSKU{"Standard_RAGRS", "Standard"}
	ARMStorageAccountSKUStandardRAGZRS = ARMStorageAccountSKU{"Standard_RAGZRS", "Standard"}
	ARMStorageAccountSKUStandardZRS    = ARMStorageAccountSKU{"Standard_ZRS", "Standard"}
)
View Source
var AccountRegistry = map[string]AccountResourceManager{} // For re-using accounts across testing

AccountRegistry is a set of accounts that are intended to be initialized when the tests start running. Suites and tests should not add to this pool. todo: long-term, support flexible static configuration of accounts.

View Source
var EAccountType = AccountType(0)
View Source
var OAuthCacheDisabledError = errors.New("the OAuth cache is currently disabled")

Reference for File Attribute Constants: https://docs.microsoft.com/en-us/windows/win32/fileio/file-attribute-constants

Functions

func AccountRegistryCleanupHook added in v10.24.0

func AccountRegistryCleanupHook(a Asserter)

func AccountRegistryInitHook added in v10.24.0

func AccountRegistryInitHook(a Asserter)

func BlockIDIntToBase64 added in v10.23.0

func BlockIDIntToBase64(blockID int) string

BlockIDIntToBase64 functions convert an int block ID to a base-64 string and vice versa

func CloneMap added in v10.24.0

func CloneMap[K comparable, V any](in map[K]V) map[K]V

func CombineQuery added in v10.24.0

func CombineQuery(a, b url.Values) url.Values

func CreateResource added in v10.24.0

func CreateResource[T ResourceManager](a Asserter, base ResourceManager, def MatchedResourceDefinition[T]) T

func DeleteAccount added in v10.24.0

func DeleteAccount(a Asserter, arm AccountResourceManager)

func DerefOrDefault added in v10.24.0

func DerefOrDefault[T any](in *T, def T) T

func DerefOrZero added in v10.24.0

func DerefOrZero[T any](in *T) (out T)

func FirstOrNil added in v10.24.0

func FirstOrNil[T any](list []T) *T

func FirstOrZero added in v10.24.0

func FirstOrZero[T any](list []T) T

func GetContentTypeMap

func GetContentTypeMap(fileExtensions []string) map[string]string

func GetTypeOrAssert added in v10.24.0

func GetTypeOrAssert[T any](a Asserter, in any) (out T)

func GetTypeOrZero added in v10.24.0

func GetTypeOrZero[T any](in any) (out T)

func IsZero added in v10.24.0

func IsZero[T comparable](in T) bool

func ListContains added in v10.24.0

func ListContains[I comparable](item I, in []I) bool

func ListOfAny added in v10.24.0

func ListOfAny[T any](in []T) []any

func LoadConfigHook added in v10.24.0

func LoadConfigHook(a Asserter)

func MapFromTags added in v10.24.0

func MapFromTags(val reflect.Value, tagName string, a ScenarioAsserter) map[string]string

MapFromTags Recursively builds a map[string]string from a reflect.val As it searches recursively through the supplied struct, The tag searched for is `flag:"name,extdata"` All extra data is comma-separated. All flags should be nillable, because zero is always a valid state, and must be distinguishable from unspecified. available extdata: - "default:xyz" Defaults to something non-standard for AzCopy-- E.g. always forcing debug logging - "defaultfunc:SpecialDefault" Calls a `func Default*(a ScenarioAsserter) string` named SpecialDefault on the struct. Asserts if not found. - "serializer:SerializerFunc" Calls a `func Serialize*(value any, a ScenarioAsserter) string` named SerializerFunc on the struct. Asserts if not found. If special characters , or : are for some reason used, \ can be used as an escape.

func PtrOf added in v10.24.0

func PtrOf[T any](in T) (out *T)

func ResolveVariation added in v10.24.0

func ResolveVariation[T any](svm *ScenarioVariationManager, options []T) T

ResolveVariation wraps ScenarioVariationManager.GetVariation, returning the variation as the user's requested type, and using the call stack as the ID ResolveVariation doesn't have a type receiver, because the type itself must have a generic type in order for one of its methods to be generic

func ResolveVariationByID added in v10.24.0

func ResolveVariationByID[T any](svm *ScenarioVariationManager, ID string, options []any) T

ResolveVariationByID is the same as ResolveVariation, but it's based upon the supplied ID rather than the call stack.

func RunAzCopy added in v10.24.0

func RunAzCopy(a ScenarioAsserter, commandSpec AzCopyCommand) (*AzCopyStdout, *AzCopyJobPlan)

RunAzCopy todo define more cleanly, implement

func RunScenarios

func RunScenarios(
	t *testing.T,
	operations Operation,
	testFromTo TestFromTo,
	validate Validate,

	requestedCredentialTypesSrc []common.CredentialType,
	requestedCredentialTypesDst []common.CredentialType,
	p params,
	hs *hooks,
	fs testFiles,

	destAccountType AccountType,
	srcAccountType AccountType,
	scenarioSuffix string)

RunScenarios is the key entry point for declarative testing. It constructs and executes scenarios (subtest in Go-speak), according to its parameters, and checks their results

func SetIfZero added in v10.24.0

func SetIfZero[T comparable](target *T, result T)

func SetupArmClient added in v10.24.0

func SetupArmClient(a Asserter)

func SetupOAuthCache added in v10.24.0

func SetupOAuthCache(a Asserter)

func SizeFromString added in v10.24.0

func SizeFromString(objectSize string) int64

func TeardownArmClient added in v10.24.0

func TeardownArmClient(a Asserter)

func TrackResourceCreation added in v10.24.0

func TrackResourceCreation(a Asserter, rm any)

func ValidateMetadata added in v10.24.0

func ValidateMetadata(a Asserter, expected, real common.Metadata)

func ValidatePlanFiles added in v10.24.0

func ValidatePlanFiles(sm *ScenarioVariationManager, plan *AzCopyJobPlan, todo any)

ValidatePlanFiles

todo: Determine an interface for this. We could have it act like ValidateResource where it will validate against a resource definition.

func ValidatePropertyPtr added in v10.24.0

func ValidatePropertyPtr[T any](a Asserter, name string, expected, real *T)

func ValidateResource added in v10.24.0

func ValidateResource[T ResourceManager](a Asserter, target T, definition MatchedResourceDefinition[T], validateObjectContent bool)

func ValidateTags added in v10.24.0

func ValidateTags(a Asserter, expected, real map[string]string)

Types

type ARMAsyncError added in v10.16.1

type ARMAsyncError struct {
	Code    string `json:"code"`
	Message string `json:"message"`
}

type ARMAsyncResponse added in v10.16.1

type ARMAsyncResponse[Props any] struct {
	ID              string  `json:"id"`
	Name            string  `json:"name"`
	Status          string  `json:"status"`
	StartTime       string  `json:"startTime"`
	EndTime         string  `json:"endTime"`
	PercentComplete float64 `json:"percentComplete"`
	// Set Properties to a pointer of your target struct, encoding/json will handle the magic.
	Properties *Props        `json:"properties"`
	Error      ARMAsyncError `json:"error"`
}

func PerformRequest added in v10.24.0

func PerformRequest[Props any](subject ARMSubject, reqSettings ARMRequestSettings, target *Props) (armResp *ARMAsyncResponse[Props], err error)

PerformRequest will deserialize to target (which assumes the target is a pointer) If an LRO is required, an *ARMAsyncResponse will be returned. Otherwise, both armResp and err will be nil, and target will be written to.

func ResolveAzureAsyncOperation added in v10.16.1

func ResolveAzureAsyncOperation[Props any](OAuth AccessToken, uri string, properties *Props) (armResp *ARMAsyncResponse[Props], err error)

ResolveAzureAsyncOperation implements https://learn.microsoft.com/en-us/azure/azure-resource-manager/management/async-operations

func (ARMAsyncResponse[Props]) Validate added in v10.24.0

func (a ARMAsyncResponse[Props]) Validate() bool

type ARMClient added in v10.24.0

type ARMClient struct {
	OAuth      AccessToken
	HttpClient *http.Client
}
var CommonARMClient *ARMClient

func (*ARMClient) Client added in v10.24.0

func (c *ARMClient) Client() *ARMClient

func (*ARMClient) ManagementURI added in v10.24.0

func (c *ARMClient) ManagementURI() url.URL

func (*ARMClient) Token added in v10.24.0

func (c *ARMClient) Token() AccessToken

type ARMExtendedLocation added in v10.24.0

type ARMExtendedLocation struct {
	Name string `json:"name"`
	Type string `json:"type"` // Can be "EdgeZone" or empty
}

type ARMManagedDisk added in v10.24.0

type ARMManagedDisk struct {
	*ARMResourceGroup
	DiskName string
}

func (*ARMManagedDisk) CreateOrUpdate added in v10.24.0

func (*ARMManagedDisk) Delete added in v10.24.0

func (md *ARMManagedDisk) Delete() error

func (*ARMManagedDisk) Get added in v10.24.0

func (md *ARMManagedDisk) Get() (*ARMManagedDiskInfo, error)

func (*ARMManagedDisk) GrantAccess added in v10.24.0

func (*ARMManagedDisk) ManagementURI added in v10.24.0

func (md *ARMManagedDisk) ManagementURI() url.URL

func (*ARMManagedDisk) PrepareRequest added in v10.24.0

func (md *ARMManagedDisk) PrepareRequest(reqSettings *ARMRequestSettings)

func (*ARMManagedDisk) RevokeAccess added in v10.24.0

func (md *ARMManagedDisk) RevokeAccess() error

type ARMManagedDiskAccessURI added in v10.24.0

type ARMManagedDiskAccessURI struct {
	AccessSAS             string `json:"accessSAS"`
	SecurityDataAccessSAS string `json:"securityDataAccessSAS"`
}

type ARMManagedDiskCreateOrUpdateParams added in v10.24.0

type ARMManagedDiskCreateOrUpdateParams struct {
	Location         string                      `json:"location"`
	ExtendedLocation *ARMExtendedLocation        `json:"extendedLocation,omitempty"`
	Sku              *ARMManagedDiskSku          `json:"sku,omitempty"`
	Properties       ARMManagedDiskPutProperties `json:"properties"` // Has mandatory field CreationData
}

type ARMManagedDiskCreationData added in v10.24.0

type ARMManagedDiskCreationData struct {
	CreateOption          *string                `json:"createOption"`
	LogicalSectorSize     *uint                  `json:"logicalSectorSize,omitempty"`     // 512-4096; 4096 is default
	GalleryImageReference ARMUnimplementedStruct `json:"galleryImageReference,omitempty"` // ImageDiskReference
	SecurityDataUri       *string                `json:"securityDataUri,omitempty"`       // ImportSecure
	SourceResourceId      *string                `json:"sourceResourceId,omitempty"`      // Copy
	SourceUniqueId        *string                `json:"sourceUniqueId,omitempty"`        // also Copy?
	SourceUri             *string                `json:"sourceUri,omitempty"`             // Import
	StorageAccountId      *string                `json:"storageAccountId,omitempty"`      // Required on Import
	UploadSizeBytes       *uint64                `json:"uploadSizeBytes,omitempty"`
}

type ARMManagedDiskGrantAccessParams added in v10.24.0

type ARMManagedDiskGrantAccessParams struct {
	AccessLevel              string `json:"access"` // "Read" or "Write"
	DurationInSeconds        uint64 `json:"durationInSeconds"`
	GetSecureVMGuestStateSAS *bool  `json:"getSecureVMGuestStateSAS,omitempty"`
}

type ARMManagedDiskInfo added in v10.24.0

type ARMManagedDiskInfo struct {
	Id                string                      `json:"id"`
	Location          string                      `json:"location"`
	ManagedBy         string                      `json:"managedBy"`
	ManagedByExtended []string                    `json:"managedByExtended"`
	Name              string                      `json:"name"`
	ExtendedLocation  ARMExtendedLocation         `json:"extendedLocation"`
	Sku               ARMManagedDiskSku           `json:"sku"`
	Tags              map[string]string           `json:"tags"`
	Zones             []string                    `json:"zones"`
	Properties        ARMManagedDiskPutProperties `json:"properties"` // Has mandatory field CreationData
}

type ARMManagedDiskPutProperties added in v10.24.0

type ARMManagedDiskPutProperties struct {
	CreationData                 ARMManagedDiskCreationData `json:"creationData"`
	BurstingEnabled              *bool                      `json:"burstingEnabled,omitempty"`
	CompletionPercent            string                     `json:"completionPercent"`
	DataAccessAuthMode           *string                    `json:"dataAccessAuthMode,omitempty"` // AzureActiveDirectory or None
	DiskAccessId                 *string                    `json:"diskAccessId,omitempty"`
	DiskIOPSReadWrite            *uint64                    `json:"diskIOPSReadWrite,omitempty"`
	DiskIOPSReadOnly             *uint64                    `json:"diskIOPSReadOnly,omitempty"`
	DiskMBpsReadOnly             *uint64                    `json:"diskMBpsReadOnly,omitempty"`
	DiskMBpsReadWrite            *uint64                    `json:"diskMBpsReadWrite,omitempty"`
	DiskSizeGB                   *uint                      `json:"diskSizeGB,omitempty"` // Mandatory if CreationData.CreateOption is empty
	Encryption                   ARMUnimplementedStruct     `json:"encryption,omitempty"` // todo?
	EncryptionSettingsCollection ARMUnimplementedStruct     `json:"encryptionSettingsCollection,omitempty"`
	HyperVGeneration             *string                    `json:"hyperVGeneration,omitempty"` // V1 or V2
	MaxShares                    *uint                      `json:"maxShares,omitempty"`        // Max VM attachments
	NetworkAccessPolicy          ARMUnimplementedStruct     `json:"networkAccessPolicy,omitempty"`
	OSType                       *string                    `json:"OSType,omitempty"`              // "Linux" or "Windows"
	PublicNetworkAccess          *string                    `json:"publicNetworkAccess,omitempty"` // "Enabled" or "Disabled"
	PurchasePlan                 ARMUnimplementedStruct     `json:"purchasePlan,omitempty"`
	SecurityProfile              ARMUnimplementedStruct     `json:"securityProfile,omitempty"`
	SupportedCapabilities        ARMUnimplementedStruct     `json:"supportedCapabilities,omitempty"`
	SupportsHibernation          *bool                      `json:"supportsHibernation,omitempty"`
	Tier                         *string                    `json:"tier,omitempty"` // Perf tier https://azure.microsoft.com/en-us/pricing/details/managed-disks/ does not apply to ultra
}

type ARMManagedDiskSku added in v10.24.0

type ARMManagedDiskSku struct {
	Name string `json:"name"`
	Tier string `json:"tier"`
}

type ARMRequestPreparer added in v10.24.0

type ARMRequestPreparer interface {
	PrepareRequest(settings *ARMRequestSettings)
}

type ARMRequestSettings added in v10.24.0

type ARMRequestSettings struct {
	Method        string
	PathExtension string
	Query         url.Values
	Headers       http.Header
	Body          interface{}
}

func (*ARMRequestSettings) CreateRequest added in v10.24.0

func (s *ARMRequestSettings) CreateRequest(baseURI url.URL) (*http.Request, error)

type ARMResourceGroup added in v10.24.0

type ARMResourceGroup struct {
	*ARMSubscription
	ResourceGroupName string
}
var CommonARMResourceGroup *ARMResourceGroup // separated in case needed.

func (*ARMResourceGroup) CreateOrUpdate added in v10.24.0

func (*ARMResourceGroup) Delete added in v10.24.0

func (rg *ARMResourceGroup) Delete(forceDeletionTypes *string) error

func (*ARMResourceGroup) GetProperties added in v10.24.0

func (rg *ARMResourceGroup) GetProperties() (*ARMResourceGroupInfo, error)

func (*ARMResourceGroup) ManagementURI added in v10.24.0

func (rg *ARMResourceGroup) ManagementURI() url.URL

func (*ARMResourceGroup) PrepareRequest added in v10.24.0

func (rg *ARMResourceGroup) PrepareRequest(reqSettings *ARMRequestSettings)

type ARMResourceGroupCreateParams added in v10.24.0

type ARMResourceGroupCreateParams struct {
	Location   string                `json:"location"` // required
	ManagedBy  *string               `json:"managedBy,omitempty"`
	Properties *ARMResourceGroupInfo `json:"properties,omitempty"`
	Tags       []string              `json:"tags,omitempty"`
}

type ARMResourceGroupInfo added in v10.24.0

type ARMResourceGroupInfo struct {
	ID                    string                                  `json:"id"`
	Location              string                                  `json:"location"`
	ManagedBy             string                                  `json:"managedBy"`
	ProvisioningStateInfo ARMResourceGroupProvisioningStateOutput `json:"properties"`
	Tags                  []string                                `json:"tags"`
	Type                  string                                  `json:"type"`
}

type ARMResourceGroupProvisioningStateOutput added in v10.24.0

type ARMResourceGroupProvisioningStateOutput struct {
	ProvisioningState string `json:"provisioningState"`
}

type ARMStorageAccount added in v10.24.0

type ARMStorageAccount struct {
	*ARMResourceGroup
	AccountName string
}

ARMStorageAccount implements an API to interface with a singular Azure Storage account via the Storage Resource Provider's REST APIs. https://learn.microsoft.com/en-us/rest/api/storagerp/storage-accounts

func (*ARMStorageAccount) Create added in v10.24.0

func (*ARMStorageAccount) Delete added in v10.24.0

func (sa *ARMStorageAccount) Delete() error

func (*ARMStorageAccount) GetKeys added in v10.24.0

func (*ARMStorageAccount) GetProperties added in v10.24.0

func (sa *ARMStorageAccount) GetProperties(expand []string) (*ARMStorageAccountProperties, error)

GetProperties pulls storage account properties; expand uses the above constants

func (*ARMStorageAccount) GetResourceManager added in v10.24.0

func (sa *ARMStorageAccount) GetResourceManager() (*AzureAccountResourceManager, error)

GetResourceManager should not be called repeatedly; it makes calls to REST APIs and does not cache.

func (*ARMStorageAccount) ManagementURI added in v10.24.0

func (sa *ARMStorageAccount) ManagementURI() url.URL

func (*ARMStorageAccount) PrepareRequest added in v10.24.0

func (sa *ARMStorageAccount) PrepareRequest(reqSettings *ARMRequestSettings)

type ARMStorageAccountCreateParams added in v10.24.0

type ARMStorageAccountCreateParams struct {
	Kind             service.AccountKind                `json:"kind"`
	Location         string                             `json:"location"`
	Sku              ARMStorageAccountSKU               `json:"sku"`
	ExtendedLocation *ARMExtendedLocation               `json:"extendedLocation,omitempty"`
	Identity         *ARMStorageAccountIdentity         `json:"identity,omitempty"`
	Properties       *ARMStorageAccountCreateProperties `json:"properties,omitempty"`
}

ARMStorageAccountCreateParams is the request body for https://learn.microsoft.com/en-us/rest/api/storagerp/storage-accounts/create?tabs=HTTP#storageaccount

type ARMStorageAccountCreateProperties added in v10.24.0

type ARMStorageAccountCreateProperties struct {
	AccessTier                            *blob.AccessTier  `json:"accessTier,omitempty"`
	AllowBlobPublicAccess                 *bool             `json:"allowBlobPublicAccess,omitempty"`
	AllowCrossTenantReplication           *bool             `json:"allowCrossTenantReplication,omitempty"`
	AllowSharedKeyAccess                  *bool             `json:"allowSharedKeyAccess,omitempty"`
	AllowedCopyScope                      json.RawMessage   `json:"allowedCopyScope,omitempty"`
	AzureFilesIdentityBasedAuthentication json.RawMessage   `json:"azureFilesIdentityBasedAuthentication,omitempty"`
	CustomDomain                          json.RawMessage   `json:"customDomain,omitempty"`
	DefaultToOAuthAuthentication          *bool             `json:"defaultToOAuthAuthentication,omitempty"`
	DNSEndpointType                       json.RawMessage   `json:"dnsEndpointType,omitempty"`
	Encryption                            json.RawMessage   `json:"encryption,omitempty"`                     // todo cpk?
	ImmutableStorageWithVersioning        json.RawMessage   `json:"immutableStorageWithVersioning,omitempty"` // todo version level WORM
	IsHnsEnabled                          *bool             `json:"isHnsEnabled,omitempty"`
	IsLocalUserEnabled                    *bool             `json:"isLocalUserEnabled,omitempty"`
	IsNfsV3Enabled                        *bool             `json:"isNfsV3Enabled,omitempty"`
	IsSftpEnabled                         *bool             `json:"isSftpEnabled,omitempty"`
	KeyPolicy                             json.RawMessage   `json:"keyPolicy,omitempty"`
	LargeFileSharesState                  *string           `json:"largeFileSharesState,omitempty"` // "Enabled" or "Disabled"
	MinimumTLSVersion                     *string           `json:"minimumTLSVersion,omitempty"`
	NetworkACLs                           json.RawMessage   `json:"networkAcls,omitempty"`
	PublicNetworkAccess                   *string           `json:"publicNetworkAccess,omitempty"` // "Enabled" or "Disabled"
	RoutingPreference                     json.RawMessage   `json:"routingPreference,omitempty"`
	SASPolicy                             json.RawMessage   `json:"sasPolicy,omitempty"`
	SupportsHttpsOnly                     *bool             `json:"supportsHttpsOnly,omitempty"`
	Tags                                  map[string]string `json:"tags"`
}

ARMStorageAccountCreateProperties implements a portion of ARMStorageAccountCreateParams. https://learn.microsoft.com/en-us/rest/api/storagerp/storage-accounts/create?tabs=HTTP#storageaccount

type ARMStorageAccountIdentity added in v10.24.0

type ARMStorageAccountIdentity struct {
	PrincipalID            string                                           `json:"principalId"`
	TenantID               string                                           `json:"tenantId"`
	Type                   string                                           `json:"type"` // https://learn.microsoft.com/en-us/rest/api/storagerp/storage-accounts/create?tabs=HTTP#identitytype
	UserAssignedIdentities map[string]ARMStorageAccountUserAssignedIdentity `json:"userAssignedIdentities"`
}

type ARMStorageAccountKey added in v10.24.0

type ARMStorageAccountKey struct {
	CreationTime string `json:"creationTime"`
	KeyName      string `json:"keyName"`
	Permissions  string `json:"permissions"`
	Value        string `json:"value"`
}

type ARMStorageAccountListKeysResult added in v10.24.0

type ARMStorageAccountListKeysResult struct {
	Keys []ARMStorageAccountKey `json:"keys"`
}

type ARMStorageAccountProperties added in v10.24.0

type ARMStorageAccountProperties struct {
	ExtendedLocation ARMExtendedLocation       `json:"extendedLocation"`
	ID               string                    `json:"id"`
	Identity         ARMStorageAccountIdentity `json:"identity"`
	Kind             service.AccountKind       `json:"kind"`
	Location         string                    `json:"location"`
	Name             string                    `json:"name"`
	Properties       struct {
		AccessTier                            blob.AccessTier   `json:"accessTier"`
		AccountMigrationInProcess             bool              `json:"accountMigrationInProcess"`
		AllowBlobPublicAccess                 bool              `json:"allowBlobPublicAccess"`
		AllowCrossTenantReplication           bool              `json:"allowCrossTenantReplication"`
		AllowSharedKeyAccess                  bool              `json:"allowSharedKeyAccess"`
		AllowedCopyScope                      json.RawMessage   `json:"allowedCopyScope"`
		AzureFilesIdentityBasedAuthentication json.RawMessage   `json:"azureFilesIdentityBasedAuthentication"`
		BlobRestoreStatus                     json.RawMessage   `json:"blobRestoreStatus"`
		CreationTime                          string            `json:"creationTime"`
		CustomDomain                          json.RawMessage   `json:"customDomain"`
		DefaultToOAuthAuthentication          bool              `json:"defaultToOAuthAuthentication"`
		DNSEndpointType                       json.RawMessage   `json:"dnsEndpointType"`
		Encryption                            json.RawMessage   `json:"encryption"` // todo: maybe needed for CPK?
		FailoverInProgress                    bool              `json:"failoverInProgress"`
		GeoReplicationStats                   json.RawMessage   `json:"geoReplicationStats"`
		ImmutableStorageWithVersioning        json.RawMessage   `json:"immutableStorageWithVersioning"` // todo: needed for testing version-level WORM
		IsHNSEnabled                          bool              `json:"isHNSEnabled"`
		IsLocalUserEnabled                    bool              `json:"isLocalUserEnabled"`
		IsNFSV3Enabled                        bool              `json:"isNfsV3Enabled"`
		IsSFTPEnabled                         bool              `json:"isSftpEnabled"`
		IsSKUConversionBlocked                bool              `json:"isSkuConversionBlocked"`
		KeyCreationTime                       json.RawMessage   `json:"keyCreationTime"`
		KeyPolicy                             json.RawMessage   `json:"keyPolicy"`            // todo: CPK?
		LargeFileSharesState                  string            `json:"largeFileSharesState"` // "Enabled" or "Disabled"
		LastGeoFailoverTime                   string            `json:"lastGeoFailoverTime"`
		MinimumTLSVersion                     json.RawMessage   `json:"minimumTLSVersion"`
		NetworkACLs                           json.RawMessage   `json:"networkAcls"`
		PrimaryEndpoints                      json.RawMessage   `json:"primaryEndpoints"`
		PrimaryLocation                       string            `json:"primaryLocation"`
		PrivateEndpointConnections            []json.RawMessage `json:"privateEndpointConnections"`
		ProvisioningState                     string            `json:"provisioningState"`
		PublicNetworkAccess                   string            `json:"publicNetworkAccess"` // "Enabled" or "Disabled"
		RoutingPreference                     json.RawMessage   `json:"routingPreference"`
		SASPolicy                             json.RawMessage   `json:"sasPolicy"`
		SecondaryEndpoints                    json.RawMessage   `json:"secondaryEndpoints"` // todo: could test azcopy's ability to fail over?
		SecondaryLocation                     string            `json:"secondaryLocation"`
		StatusOfPrimary                       string            `json:"statusOfPrimary"`
		StatusOfSecondary                     string            `json:"statusOfSecondary"`
		StorageAccountSkuConversionStatus     json.RawMessage   `json:"storageAccountSkuConversionStatus"`
		SupportsHTTPSTrafficOnly              bool              `json:"supportsHttpsTrafficOnly"`
	} `json:"properties"`
	Sku  ARMStorageAccountSKU `json:"sku"`
	Tags map[string]string    `json:"tags"`
	Type string               `json:"type"`
}

type ARMStorageAccountSKU added in v10.24.0

type ARMStorageAccountSKU struct {
	Name string `json:"name"`
	Tier string `json:"tier"`
}

type ARMStorageAccountUserAssignedIdentity added in v10.24.0

type ARMStorageAccountUserAssignedIdentity struct {
	ClientID    string `json:"clientId"`
	PrincipalID string `json:"principalId"`
}

type ARMSubject added in v10.24.0

type ARMSubject interface {
	Token() AccessToken
	Client() *ARMClient
	ManagementURI() url.URL
}

type ARMSubscription added in v10.24.0

type ARMSubscription struct {
	*ARMClient
	SubscriptionID string
}

func (*ARMSubscription) ManagementURI added in v10.24.0

func (s *ARMSubscription) ManagementURI() url.URL

type ARMUnimplementedStruct added in v10.24.0

type ARMUnimplementedStruct json.RawMessage

ARMUnimplementedStruct is used to fill in the blanks in types when implementation doesn't seem like a good use of time. It can be explored with "Get", if you know precisely what you want.

func (ARMUnimplementedStruct) Get added in v10.24.0

func (s ARMUnimplementedStruct) Get(Key []string, out interface{}) error

type AccessToken added in v10.24.0

type AccessToken interface {
	FreshToken() (string, error)
	CurrentToken() string
}

type AccountResourceManager added in v10.24.0

type AccountResourceManager interface {
	AccountName() string
	AccountType() AccountType
	AvailableServices() []common.Location
	GetService(Asserter, common.Location) ServiceResourceManager
}

AccountResourceManager manages an account.

func CreateAccount added in v10.24.0

func CreateAccount(a Asserter, accountType AccountType, options *CreateAccountOptions) AccountResourceManager

func GetAccount added in v10.24.0

func GetAccount(a Asserter, AccountName string) AccountResourceManager

type AccountType

type AccountType uint8

func (AccountType) Azurite added in v10.22.1

func (AccountType) Azurite() AccountType

func (AccountType) Classic added in v10.14.0

func (AccountType) Classic() AccountType

func (AccountType) GCP added in v10.24.0

func (AccountType) GCP() AccountType

func (AccountType) HierarchicalNamespaceEnabled

func (AccountType) HierarchicalNamespaceEnabled() AccountType

func (AccountType) IsBlobOnly added in v10.16.1

func (o AccountType) IsBlobOnly() bool

func (AccountType) IsManagedDisk added in v10.16.1

func (o AccountType) IsManagedDisk() bool

func (AccountType) ManagedDiskSnapshot added in v10.24.0

func (AccountType) ManagedDiskSnapshot() AccountType

func (AccountType) ManagedDiskSnapshotOAuth added in v10.24.0

func (AccountType) ManagedDiskSnapshotOAuth() AccountType

func (AccountType) OAuthManagedDisk added in v10.16.1

func (AccountType) OAuthManagedDisk() AccountType

func (AccountType) PremiumBlockBlobs added in v10.24.0

func (AccountType) PremiumBlockBlobs() AccountType

func (AccountType) PremiumFileShares added in v10.24.0

func (AccountType) PremiumFileShares() AccountType

func (AccountType) PremiumHNSEnabled added in v10.24.0

func (AccountType) PremiumHNSEnabled() AccountType

func (AccountType) PremiumPageBlobs added in v10.24.0

func (AccountType) PremiumPageBlobs() AccountType

func (AccountType) S3 added in v10.24.0

func (AccountType) S3() AccountType

func (AccountType) Standard

func (AccountType) Standard() AccountType

func (AccountType) StdManagedDisk added in v10.16.1

func (AccountType) StdManagedDisk() AccountType

func (AccountType) String

func (o AccountType) String() string

type Asserter added in v10.24.0

type Asserter interface {
	NoError(comment string, err error)
	// Assert fails the test, but does not exit.
	Assert(comment string, assertion Assertion, items ...any)
	// AssertNow wraps Assert, and exits if failed.
	AssertNow(comment string, assertion Assertion, items ...any)
	// Error fails the test, exiting immediately.
	Error(reason string)
	// Skip skips the test, exiting immediately.
	Skip(reason string)
	// Log wraps t.Log with fmt.Sprintf
	Log(format string, a ...any)

	// Failed returns if the test has already failed.
	Failed() bool
}

func NewFrameworkAsserter added in v10.24.0

func NewFrameworkAsserter(t *testing.T) Asserter

type Assertion added in v10.24.0

type Assertion interface {
	Name() string
	// MaxArgs must be >= 1; or 0 to indicate no maximum
	MaxArgs() int
	// MinArgs must be 0 or => MaxArgs
	MinArgs() int
	// Assert must operate over all provided items
	Assert(items ...any) bool
}

type AzCopyCommand added in v10.24.0

type AzCopyCommand struct {
	Verb AzCopyVerb
	// Passing a ResourceManager assumes SAS (or GCP/S3) auth is intended.
	// Passing an AzCopyTarget will allow you to specify an exact credential type.
	// When OAuth, S3, GCP, AcctKey, etc. the appropriate env flags should auto-populate.
	Targets     []ResourceManager
	Flags       any // check SampleFlags
	Environment *AzCopyEnvironment

	ShouldFail bool
}

type AzCopyEnvironment added in v10.24.0

type AzCopyEnvironment struct {
	LogLocation                  *string `env:"AZCOPY_LOG_LOCATION,defaultfunc:DefaultLogLoc"`
	JobPlanLocation              *string `env:"AZCOPY_JOB_PLAN_LOCATION,defaultfunc:DefaultPlanLoc"`
	AutoLoginMode                *string `env:"AZCOPY_AUTO_LOGIN_TYPE"`
	AutoLoginTenantID            *string `env:"AZCOPY_TENANT_ID"`
	ServicePrincipalAppID        *string `env:"AZCOPY_SPA_APPLICATION_ID"`
	ServicePrincipalClientSecret *string `env:"AZCOPY_SPA_CLIENT_SECRET"`

	InheritEnvironment bool
}

func (*AzCopyEnvironment) DefaultLogLoc added in v10.24.0

func (env *AzCopyEnvironment) DefaultLogLoc(a ScenarioAsserter) string

func (*AzCopyEnvironment) DefaultPlanLoc added in v10.24.0

func (env *AzCopyEnvironment) DefaultPlanLoc(a ScenarioAsserter) string

type AzCopyJobPlan added in v10.24.0

type AzCopyJobPlan struct{}

AzCopyJobPlan todo probably load the job plan directly? WI#26418256

type AzCopyStdout added in v10.24.0

type AzCopyStdout struct {
	RawOutput []string
}

AzCopyStdout shouldn't be used or relied upon right now! This will be fleshed out eventually. todo WI#26418258

func (*AzCopyStdout) String added in v10.24.0

func (a *AzCopyStdout) String() string

func (*AzCopyStdout) Write added in v10.24.0

func (a *AzCopyStdout) Write(p []byte) (n int, err error)

type AzCopyTarget added in v10.24.0

type AzCopyTarget struct {
	ResourceManager
	AuthType ExplicitCredentialTypes // Expects *one* credential type that the Resource supports. Assumes SAS (or GCP/S3) if not present.
	Opts     CreateAzCopyTargetOptions
}

func CreateAzCopyTarget added in v10.24.0

func CreateAzCopyTarget(rm ResourceManager, authType ExplicitCredentialTypes, a Asserter, opts ...CreateAzCopyTargetOptions) AzCopyTarget

func TryApplySpecificAuthType added in v10.24.0

func TryApplySpecificAuthType(rm ResourceManager, cred ExplicitCredentialTypes, a Asserter, opts ...CreateAzCopyTargetOptions) AzCopyTarget

type AzCopyVerb added in v10.24.0

type AzCopyVerb string
const (
	AzCopyVerbCopy   AzCopyVerb = "copy"
	AzCopyVerbSync   AzCopyVerb = "sync"
	AzCopyVerbRemove AzCopyVerb = "remove"
)

type AzCoreAccessToken added in v10.24.0

type AzCoreAccessToken struct {
	Scope string // this is bad design but maybe it's right
	// contains filtered or unexported fields
}

func (*AzCoreAccessToken) CurrentToken added in v10.24.0

func (a *AzCoreAccessToken) CurrentToken() string

func (*AzCoreAccessToken) FreshToken added in v10.24.0

func (a *AzCoreAccessToken) FreshToken() (string, error)

FreshToken attempts to cleanly get a token.

type AzureAccountResourceManager added in v10.24.0

type AzureAccountResourceManager struct {
	// contains filtered or unexported fields
}

func (*AzureAccountResourceManager) AccountName added in v10.24.0

func (acct *AzureAccountResourceManager) AccountName() string

func (*AzureAccountResourceManager) AccountType added in v10.24.0

func (acct *AzureAccountResourceManager) AccountType() AccountType

func (*AzureAccountResourceManager) ApplySAS added in v10.24.0

func (acct *AzureAccountResourceManager) ApplySAS(URI string, loc common.Location, optList ...GetURIOptions) string

func (*AzureAccountResourceManager) AvailableServices added in v10.24.0

func (acct *AzureAccountResourceManager) AvailableServices() []common.Location

func (*AzureAccountResourceManager) GetService added in v10.24.0

func (*AzureAccountResourceManager) ManagementClient added in v10.24.0

func (acct *AzureAccountResourceManager) ManagementClient() *ARMStorageAccount

ManagementClient returns the parent management client for this storage account. If this was created raw from key+name, this will return nil. If the account is a "modern" ARM storage account, ARMStorageAccount will be returned. If the account is a "classic" storage account, ARMClassicStorageAccount (not yet implemented) will be returned.

type AzureURIOpts added in v10.24.0

type AzureURIOpts struct {
	// Must be manually specified
	WithSAS bool
	// Defaults to a resource-level specific minimally permissioned SAS token.
	SASValues GenericSignatureValues
}

type BlobContainerCreateOptions added in v10.24.0

type BlobContainerCreateOptions = container.CreateOptions

type BlobContainerProperties added in v10.24.0

type BlobContainerProperties struct {
	Access       *container.PublicAccessType
	CPKScopeInfo *container.CPKScopeInfo
}

type BlobContainerResourceManager added in v10.24.0

type BlobContainerResourceManager struct {
	Service *BlobServiceResourceManager
	// contains filtered or unexported fields
}

func (*BlobContainerResourceManager) Account added in v10.24.0

func (*BlobContainerResourceManager) Canon added in v10.24.0

func (*BlobContainerResourceManager) ContainerName added in v10.24.0

func (b *BlobContainerResourceManager) ContainerName() string

func (*BlobContainerResourceManager) Create added in v10.24.0

func (*BlobContainerResourceManager) CreateWithOptions added in v10.24.0

func (b *BlobContainerResourceManager) CreateWithOptions(a Asserter, options *BlobContainerCreateOptions)

func (*BlobContainerResourceManager) DefaultAuthType added in v10.24.0

func (*BlobContainerResourceManager) Delete added in v10.24.0

func (*BlobContainerResourceManager) Exists added in v10.24.0

func (b *BlobContainerResourceManager) Exists() bool

func (*BlobContainerResourceManager) GetMetadata added in v10.24.0

func (*BlobContainerResourceManager) GetObject added in v10.24.0

func (*BlobContainerResourceManager) GetProperties added in v10.24.0

func (*BlobContainerResourceManager) HasMetadata added in v10.24.0

func (*BlobContainerResourceManager) Level added in v10.24.0

func (*BlobContainerResourceManager) ListObjects added in v10.24.0

func (b *BlobContainerResourceManager) ListObjects(a Asserter, prefix string, recursive bool) map[string]ObjectProperties

func (*BlobContainerResourceManager) Location added in v10.24.0

func (*BlobContainerResourceManager) Parent added in v10.24.0

func (*BlobContainerResourceManager) ResourceClient added in v10.24.0

func (b *BlobContainerResourceManager) ResourceClient() any

func (*BlobContainerResourceManager) SetMetadata added in v10.24.0

func (b *BlobContainerResourceManager) SetMetadata(a Asserter, metadata common.Metadata)

func (*BlobContainerResourceManager) URI added in v10.24.0

func (*BlobContainerResourceManager) ValidAuthTypes added in v10.24.0

func (*BlobContainerResourceManager) WithSpecificAuthType added in v10.24.0

type BlobFSFileSystemResourceManager added in v10.24.0

type BlobFSFileSystemResourceManager struct {
	Service *BlobFSServiceResourceManager
	// contains filtered or unexported fields
}

func (*BlobFSFileSystemResourceManager) Account added in v10.24.0

func (*BlobFSFileSystemResourceManager) Canon added in v10.24.0

func (*BlobFSFileSystemResourceManager) ContainerName added in v10.24.0

func (b *BlobFSFileSystemResourceManager) ContainerName() string

func (*BlobFSFileSystemResourceManager) Create added in v10.24.0

func (*BlobFSFileSystemResourceManager) CreateWithOptions added in v10.24.0

func (b *BlobFSFileSystemResourceManager) CreateWithOptions(a Asserter, opts *filesystem.CreateOptions)

func (*BlobFSFileSystemResourceManager) DefaultAuthType added in v10.24.0

func (*BlobFSFileSystemResourceManager) Delete added in v10.24.0

func (*BlobFSFileSystemResourceManager) DeleteWithOptions added in v10.24.0

func (b *BlobFSFileSystemResourceManager) DeleteWithOptions(a Asserter, opts *filesystem.DeleteOptions)

func (*BlobFSFileSystemResourceManager) Exists added in v10.24.0

func (*BlobFSFileSystemResourceManager) GetObject added in v10.24.0

func (*BlobFSFileSystemResourceManager) GetProperties added in v10.24.0

func (*BlobFSFileSystemResourceManager) Level added in v10.24.0

func (*BlobFSFileSystemResourceManager) ListObjects added in v10.24.0

func (b *BlobFSFileSystemResourceManager) ListObjects(a Asserter, prefixOrDirectory string, recursive bool) map[string]ObjectProperties

func (*BlobFSFileSystemResourceManager) Location added in v10.24.0

func (*BlobFSFileSystemResourceManager) Parent added in v10.24.0

func (*BlobFSFileSystemResourceManager) ResourceClient added in v10.24.0

func (b *BlobFSFileSystemResourceManager) ResourceClient() any

func (*BlobFSFileSystemResourceManager) URI added in v10.24.0

func (*BlobFSFileSystemResourceManager) ValidAuthTypes added in v10.24.0

func (*BlobFSFileSystemResourceManager) WithSpecificAuthType added in v10.24.0

type BlobFSPathGetPropertiesOptions added in v10.24.0

type BlobFSPathGetPropertiesOptions struct {
	AccessConditions *file.AccessConditions
	CPKInfo          *file.CPKInfo
	UPN              *bool
}

type BlobFSPathResourceProvider added in v10.24.0

type BlobFSPathResourceProvider struct {
	Service   *BlobFSServiceResourceManager
	Container *BlobFSFileSystemResourceManager
	// contains filtered or unexported fields
}

func (*BlobFSPathResourceProvider) Account added in v10.24.0

func (*BlobFSPathResourceProvider) Canon added in v10.24.0

func (*BlobFSPathResourceProvider) ContainerName added in v10.24.0

func (b *BlobFSPathResourceProvider) ContainerName() string

func (*BlobFSPathResourceProvider) Create added in v10.24.0

func (*BlobFSPathResourceProvider) DefaultAuthType added in v10.24.0

func (*BlobFSPathResourceProvider) Delete added in v10.24.0

func (b *BlobFSPathResourceProvider) Delete(a Asserter)

func (*BlobFSPathResourceProvider) Download added in v10.24.0

func (*BlobFSPathResourceProvider) EntityType added in v10.24.0

func (*BlobFSPathResourceProvider) Exists added in v10.24.0

func (b *BlobFSPathResourceProvider) Exists() bool

func (*BlobFSPathResourceProvider) GetProperties added in v10.24.0

func (*BlobFSPathResourceProvider) GetPropertiesWithOptions added in v10.24.0

func (*BlobFSPathResourceProvider) Level added in v10.24.0

func (*BlobFSPathResourceProvider) ListChildren added in v10.24.0

func (b *BlobFSPathResourceProvider) ListChildren(a Asserter, recursive bool) map[string]ObjectProperties

func (*BlobFSPathResourceProvider) Location added in v10.24.0

func (*BlobFSPathResourceProvider) ObjectName added in v10.24.0

func (b *BlobFSPathResourceProvider) ObjectName() string

func (*BlobFSPathResourceProvider) Parent added in v10.24.0

func (*BlobFSPathResourceProvider) ResourceClient added in v10.24.0

func (b *BlobFSPathResourceProvider) ResourceClient() any

func (*BlobFSPathResourceProvider) SetHTTPHeaders added in v10.24.0

func (b *BlobFSPathResourceProvider) SetHTTPHeaders(a Asserter, h contentHeaders)

func (*BlobFSPathResourceProvider) SetMetadata added in v10.24.0

func (b *BlobFSPathResourceProvider) SetMetadata(a Asserter, metadata common.Metadata)

func (*BlobFSPathResourceProvider) SetObjectProperties added in v10.24.0

func (b *BlobFSPathResourceProvider) SetObjectProperties(a Asserter, props ObjectProperties)

func (*BlobFSPathResourceProvider) URI added in v10.24.0

func (*BlobFSPathResourceProvider) ValidAuthTypes added in v10.24.0

func (*BlobFSPathResourceProvider) WithSpecificAuthType added in v10.24.0

type BlobFSProperties added in v10.24.0

type BlobFSProperties struct {
	Permissions *string
	Owner       *string
	Group       *string
	ACL         *string
}

type BlobFSServiceResourceManager added in v10.24.0

type BlobFSServiceResourceManager struct {
	// contains filtered or unexported fields
}

func (*BlobFSServiceResourceManager) Account added in v10.24.0

func (*BlobFSServiceResourceManager) Canon added in v10.24.0

func (*BlobFSServiceResourceManager) DefaultAuthType added in v10.24.0

func (*BlobFSServiceResourceManager) GetContainer added in v10.24.0

func (b *BlobFSServiceResourceManager) GetContainer(containerName string) ContainerResourceManager

func (*BlobFSServiceResourceManager) IsHierarchical added in v10.24.0

func (b *BlobFSServiceResourceManager) IsHierarchical() bool

func (*BlobFSServiceResourceManager) Level added in v10.24.0

func (*BlobFSServiceResourceManager) ListContainers added in v10.24.0

func (b *BlobFSServiceResourceManager) ListContainers(a Asserter) []string

func (*BlobFSServiceResourceManager) Location added in v10.24.0

func (*BlobFSServiceResourceManager) Parent added in v10.24.0

func (*BlobFSServiceResourceManager) ResourceClient added in v10.24.0

func (b *BlobFSServiceResourceManager) ResourceClient() any

func (*BlobFSServiceResourceManager) URI added in v10.24.0

func (*BlobFSServiceResourceManager) ValidAuthTypes added in v10.24.0

func (*BlobFSServiceResourceManager) WithSpecificAuthType added in v10.24.0

type BlobObjectCreateOptions added in v10.24.0

type BlobObjectCreateOptions struct {
	BlockSize  *int64
	CpkOptions common.CpkOptions
}

type BlobObjectGetPropertiesOptions added in v10.24.0

type BlobObjectGetPropertiesOptions struct {
	CPKOptions common.CpkOptions
}

type BlobObjectResourceManager added in v10.24.0

type BlobObjectResourceManager struct {
	Service   *BlobServiceResourceManager
	Container *BlobContainerResourceManager
	Path      string
	// contains filtered or unexported fields
}

func (*BlobObjectResourceManager) Account added in v10.24.0

func (*BlobObjectResourceManager) Canon added in v10.24.0

func (b *BlobObjectResourceManager) Canon() string

func (*BlobObjectResourceManager) ContainerName added in v10.24.0

func (b *BlobObjectResourceManager) ContainerName() string

func (*BlobObjectResourceManager) Create added in v10.24.0

Create defaults to Block Blob. For implementation-specific options, GetTypeOrZero[T] / GetTypeOrAssert[T] to BlobObjectResourceManager and call CreateWithOptions

func (*BlobObjectResourceManager) CreateWithOptions added in v10.24.0

func (b *BlobObjectResourceManager) CreateWithOptions(a Asserter, body ObjectContentContainer, properties ObjectProperties, options *BlobObjectCreateOptions)

func (*BlobObjectResourceManager) DefaultAuthType added in v10.24.0

func (*BlobObjectResourceManager) Delete added in v10.24.0

func (b *BlobObjectResourceManager) Delete(a Asserter)

func (*BlobObjectResourceManager) Download added in v10.24.0

func (*BlobObjectResourceManager) EntityType added in v10.24.0

func (*BlobObjectResourceManager) Exists added in v10.24.0

func (b *BlobObjectResourceManager) Exists() bool

func (*BlobObjectResourceManager) GetProperties added in v10.24.0

func (*BlobObjectResourceManager) GetPropertiesWithOptions added in v10.24.0

func (b *BlobObjectResourceManager) GetPropertiesWithOptions(a Asserter, options *BlobObjectGetPropertiesOptions) ObjectProperties

func (*BlobObjectResourceManager) Level added in v10.24.0

func (*BlobObjectResourceManager) ListChildren added in v10.24.0

func (b *BlobObjectResourceManager) ListChildren(a Asserter, recursive bool) map[string]ObjectProperties

func (*BlobObjectResourceManager) Location added in v10.24.0

func (*BlobObjectResourceManager) ObjectName added in v10.24.0

func (b *BlobObjectResourceManager) ObjectName() string

func (*BlobObjectResourceManager) Parent added in v10.24.0

func (*BlobObjectResourceManager) ResourceClient added in v10.24.0

func (b *BlobObjectResourceManager) ResourceClient() any

func (*BlobObjectResourceManager) SetHTTPHeaders added in v10.24.0

func (b *BlobObjectResourceManager) SetHTTPHeaders(a Asserter, h contentHeaders)

func (*BlobObjectResourceManager) SetMetadata added in v10.24.0

func (b *BlobObjectResourceManager) SetMetadata(a Asserter, metadata common.Metadata)

func (*BlobObjectResourceManager) SetObjectProperties added in v10.24.0

func (b *BlobObjectResourceManager) SetObjectProperties(a Asserter, props ObjectProperties)

func (*BlobObjectResourceManager) URI added in v10.24.0

func (*BlobObjectResourceManager) ValidAuthTypes added in v10.24.0

func (*BlobObjectResourceManager) WithSpecificAuthType added in v10.24.0

type BlobProperties added in v10.24.0

type BlobProperties struct {
	Type                *blob.BlobType
	Tags                map[string]string
	BlockBlobAccessTier *blob.AccessTier
	PageBlobAccessTier  *pageblob.PremiumPageBlobAccessTier
}

type BlobServiceResourceManager added in v10.24.0

type BlobServiceResourceManager struct {
	// contains filtered or unexported fields
}

func (*BlobServiceResourceManager) Account added in v10.24.0

func (*BlobServiceResourceManager) Canon added in v10.24.0

func (*BlobServiceResourceManager) DefaultAuthType added in v10.24.0

func (*BlobServiceResourceManager) GetContainer added in v10.24.0

func (*BlobServiceResourceManager) IsHierarchical added in v10.24.0

func (b *BlobServiceResourceManager) IsHierarchical() bool

func (*BlobServiceResourceManager) Level added in v10.24.0

func (*BlobServiceResourceManager) ListContainers added in v10.24.0

func (b *BlobServiceResourceManager) ListContainers(a Asserter) []string

func (*BlobServiceResourceManager) Location added in v10.24.0

func (*BlobServiceResourceManager) Parent added in v10.24.0

func (*BlobServiceResourceManager) ResourceClient added in v10.24.0

func (b *BlobServiceResourceManager) ResourceClient() any

func (*BlobServiceResourceManager) URI added in v10.24.0

func (*BlobServiceResourceManager) ValidAuthTypes added in v10.24.0

func (*BlobServiceResourceManager) WithSpecificAuthType added in v10.24.0

type BlobSignatureValues added in v10.24.0

type BlobSignatureValues interface {
	SignWithSharedKey(credential *blobsas.SharedKeyCredential) (blobsas.QueryParameters, error)
}

BlobSignatureValues makes both account/service signature values generic for output from GenericSignatureValues

type CommonFilterFlags added in v10.24.0

type CommonFilterFlags struct {
	IncludePattern []string `flag:"include-pattern,serializer:SerializeStrings"`
	ExcludePattern []string `flag:"exclude-pattern,serializer:SerializeStrings"`

	IncludeRegex []string `flag:"include-regex,serializer:SerializeStrings"`
	ExcludeRegex []string `flag:"include-regex,serializer:SerializeStrings"`

	IncludePath []string `flag:"include-path,serializer:SerializeStrings"`
	ExcludePath []string `flag:"exclude-path,serializer:SerializeStrings"`

	// Copy/remove only
	IncludeBefore *time.Time `flag:"include-before,serializer:SerializeTime"`
	IncludeAfter  *time.Time `flag:"include-after,serializer:SerializeTime"`

	// primarily for testing errors, copy/sync only
	LegacyInclude []string `flag:"include,serializer:SerializeStrings"`
	LegacyExclude []string `flag:"exclude,serializer:SerializeStrings"`

	IncludeAttributes []WindowsAttribute `flag:"include-attributes,serializer:SerializeAttributeList"`
	ExcludeAttributes []WindowsAttribute `flag:"exclude-attributes,serializer:SerializeAttributeList"`
}

func (CommonFilterFlags) SerializeAttributeList added in v10.24.0

func (CommonFilterFlags) SerializeAttributeList(list any, a ScenarioAsserter) string

func (CommonFilterFlags) SerializeStrings added in v10.24.0

func (CommonFilterFlags) SerializeStrings(list any, a ScenarioAsserter) string

func (CommonFilterFlags) SerializeTime added in v10.24.0

func (CommonFilterFlags) SerializeTime(t any, a ScenarioAsserter) string

type ConfigReaderError added in v10.24.0

type ConfigReaderError struct {
	StructName      string
	EnvErrors       map[string]EnvError          // Mapped by env var name
	StructureErrors map[string]ConfigReaderError // Mapped by struct name (e.g. E2EAuthConfig)
	CoreError       error
}

func NewConfigReaderError added in v10.24.0

func NewConfigReaderError(StructName string) *ConfigReaderError

func NewConfigReaderErrorEnv added in v10.24.0

func NewConfigReaderErrorEnv(envName string, fieldName string, err error) *ConfigReaderError

func ReadConfig added in v10.24.0

func ReadConfig(config reflect.Value, fieldName string, tag EnvTag) *ConfigReaderError

func SetValue added in v10.24.0

func SetValue(fieldName string, val reflect.Value, tag EnvTag) *ConfigReaderError

func (*ConfigReaderError) Combine added in v10.24.0

func (c *ConfigReaderError) Combine(with *ConfigReaderError)

func (*ConfigReaderError) Empty added in v10.24.0

func (c *ConfigReaderError) Empty() bool

func (*ConfigReaderError) Error added in v10.24.0

func (c *ConfigReaderError) Error() string

func (*ConfigReaderError) Finalize added in v10.24.0

func (c *ConfigReaderError) Finalize() *ConfigReaderError

func (*ConfigReaderError) Flatten added in v10.24.0

func (c *ConfigReaderError) Flatten(parent string) string

func (*ConfigReaderError) WrangleAsError added in v10.24.0

func (c *ConfigReaderError) WrangleAsError() error

type ContainerProperties added in v10.24.0

type ContainerProperties struct {
	// Used by multiple services, makes sense to have as a general option.
	// When specified by user: Nil = unspecified/unverified
	// When returned by manager: Nil = unsupported
	Metadata common.Metadata

	// BlobContainerProperties is shared with BlobFS, because they're the same resource and share parameters
	BlobContainerProperties BlobContainerProperties
	FileContainerProperties FileContainerProperties
}

type ContainerResourceManager added in v10.24.0

type ContainerResourceManager interface {
	ResourceManager

	ContainerName() string
	// Create should ignore errors of existing containers. It is expected to attempt to track container creation.
	Create(a Asserter, props ContainerProperties)
	// GetProperties polls container properties.
	GetProperties(a Asserter) ContainerProperties
	// Delete should ignore errors of nonexistent containers
	Delete(a Asserter)
	// ListObjects treats prefixOrDirectory as a prefix when in a non-hierarchical service, and as a directory in a hierarchical service.
	// The map will be the real path, relative to container root, not to prefix/directory.
	ListObjects(a Asserter, prefixOrDirectory string, recursive bool) map[string]ObjectProperties
	// GetObject scales up to a target ObjectResourceManager
	GetObject(a Asserter, path string, eType common.EntityType) ObjectResourceManager
	// Exists determines if the container in question exists
	Exists() bool
}

func NewLocalContainer added in v10.24.0

func NewLocalContainer(a Asserter) ContainerResourceManager

type CopyFlags added in v10.24.0

type CopyFlags struct {
	CopySyncCommonFlags

	FollowSymlinks  *bool                 `flag:"follow-symlinks"`
	ListOfFiles     []string              `flag:"list-of-files,serializer:SerializeListingFile"`
	Overwrite       *bool                 `flag:"overwrite"`
	Decompress      *bool                 `flag:"decompress"`
	ExcludeBlobType *common.BlobType      `flag:"exclude-blob-type"`
	BlobType        *common.BlobType      `flag:"blob-type"`
	BlockBlobTier   *common.BlockBlobTier `flag:"block-blob-tier"`
	PageBlobTier    *common.BlockBlobTier `flag:"page-blob-tier"`
	Metadata        common.Metadata       `flag:"metadata,serializer:SerializeMetadata"`

	ContentType        *string `flag:"content-type"`
	ContentEncoding    *string `flag:"content-encoding"`
	ContentDisposition *string `flag:"content-disposition"`
	ContentLanguage    *string `flag:"content-language"`
	CacheControl       *string `flag:"cache-control"`

	NoGuessMimeType *bool `flag:"no-guess-mime-type"`
	PreserveLMT     *bool `flag:"preserve-last-modified-time"`

	AsSubdir         *bool `flag:"as-subdir"`
	PreserveOwner    *bool `flag:"preserve-owner"`
	PreserveSymlinks *bool `flag:"preserve-symlinks"`

	// semi-related WIs for CheckLength present in GlobalFlags (WI#26475473, WI#26475441)
	// goal would be to test the unhappy case of CheckLength=true by altering after enumeration time
	CheckLength *bool `flag:"check-length"`

	S2SPreserveProperties     *bool           `flag:"check-length"`
	S2SDetectSourceChanged    *bool           `flag:"s2s-detect-source-changed"`
	ListOfVersions            []string        `flag:"list-of-versions,serializer:SerializeListingFile"`
	BlobTags                  common.Metadata `flag:"blob-tags,serializer:SerializeTags"`
	IncludeDirectoryStubs     *bool           `flag:"include-directory-stubs"`
	DisableAutoDecoding       *bool           `flag:"disable-auto-decoding"`
	S2SGetPropertiesInBackend *bool           `flag:"s2s-get-properties-in-backend"`
	ADLSFlushThreshold        *uint32         `flag:"flush-threshold"`
}

CopyFlags is a more exclusive struct including flags exclusi

func (CopyFlags) SerializeKeyValues added in v10.24.0

func (CopyFlags) SerializeKeyValues(in any, a ScenarioAsserter, kvsep, elemsep string) string

SerializeKeyValues kvsep = what should be between a key and value elemsep = what should be between two pairs

func (CopyFlags) SerializeListingFile added in v10.24.0

func (CopyFlags) SerializeListingFile(in any, a ScenarioAsserter) string

func (CopyFlags) SerializeMetadata added in v10.24.0

func (c CopyFlags) SerializeMetadata(meta any, a ScenarioAsserter) string

func (CopyFlags) SerializeTags added in v10.24.0

func (c CopyFlags) SerializeTags(tags any, a ScenarioAsserter) string

type CopyOrSyncCommandResult

type CopyOrSyncCommandResult struct {
	// contains filtered or unexported fields
}

func (*CopyOrSyncCommandResult) GetTransferList

func (c *CopyOrSyncCommandResult) GetTransferList(status common.TransferStatus, azcopyDir string) ([]common.TransferDetail, error)

type CopySyncCommonFlags added in v10.24.0

type CopySyncCommonFlags struct {
	GlobalFlags
	CommonFilterFlags

	Recursive           *bool          `flag:"recursive"`
	FromTo              *common.FromTo `flag:"from-to"`
	BlockSizeMB         *float64       `flag:"block-size-mb"`
	PreservePermissions *bool          `flag:"preserve-permissions"`
	// PreserveSMBPermissions refers to explicitly using the classic, deprecated flag, in case we want to validate the warning is spat out.
	PreserveSMBPermissions  *bool                        `flag:"preserve-smb-permissions"`
	PreservePOSIXProperties *bool                        `flag:"preserve-posix-properties"`
	ForceIfReadOnly         *bool                        `flag:"force-if-read-only"`
	PutMD5                  *bool                        `flag:"put-md5"`
	CheckMD5                *common.HashValidationOption `flag:"check-md5"`
	S2SPreserveAccessTier   *bool                        `flag:"s2s-preserve-access-tier"`
	S2SPreserveBlobTags     *bool                        `flag:"s2s-preserve-blob-tags"`
	DryRun                  *bool                        `flag:"dry-run"`
	TrailingDot             *common.TrailingDotOption    `flag:"trailing-dot"`
	CPKByName               *string                      `flag:"cpk-by-name"`
	CPKByValue              *bool                        `flag:"cpk-by-value"`
}

CopySyncCommonFlags is a list of flags with feature parity across copy and sync.

type CreateAccountOptions added in v10.24.0

type CreateAccountOptions struct {
	// ParentResourceGroup overrides CommonARMResourceGroup as a default.
	// If using a custom resource group, that RG should be automagically cleaned up.
	// The default RG automatically cleans up when the suite stops running.
	ParentResourceGroup *ARMResourceGroup
	// CustomName will be suffixed with the last section of a UUID
	CustomName *string

	// ParamMutator is intended for one-off excursions into boilerplate land
	ParamMutator func(createParams *ARMStorageAccountCreateParams)
}

type CreateAzCopyTargetOptions added in v10.24.0

type CreateAzCopyTargetOptions struct {
	// SASTokenOptions expects a GenericSignatureValues, which can contain account signatures, or a service signature.
	SASTokenOptions GenericSignatureValues
	Scheme          string
}

type DatalakeSignatureValues added in v10.24.0

type DatalakeSignatureValues interface {
	SignWithSharedKey(credential *datalakesas.SharedKeyCredential) (datalakesas.QueryParameters, error)
}

DatalakeSignatureValues makes both account/service signature values generic for output from GenericSignatureValues

type DryrunAsserter added in v10.24.0

type DryrunAsserter interface {
	Asserter

	Dryrun() bool
	Invalid() bool
	InvalidateScenario()
}

type Empty added in v10.24.0

type Empty struct {
	// Invert is distinctly different from Not{Empty{}}, in that Not{Empty{}} states "if *any* object is not empty", but Empty{Invert: true} specifies that ALL objects are nonzero
	Invert bool
}

Empty checks that all parameters are equivalent to their zero-values

func (Empty) Assert added in v10.24.0

func (e Empty) Assert(items ...any) bool

func (Empty) Format added in v10.24.0

func (e Empty) Format(items ...any) string

func (Empty) MaxArgs added in v10.24.0

func (e Empty) MaxArgs() int

func (Empty) MinArgs added in v10.24.0

func (e Empty) MinArgs() int

func (Empty) Name added in v10.24.0

func (e Empty) Name() string

type EnvError added in v10.24.0

type EnvError struct {
	EnvName   string
	FieldName string
	CoreError error
}

func (EnvError) Error added in v10.24.0

func (e EnvError) Error(scope string) string

type EnvTag added in v10.24.0

type EnvTag struct {
	EnvName                     string
	DefaultValue                string
	Required, MutuallyExclusive bool
	MinimumRequired             uint
}

func ParseEnvTag added in v10.24.0

func ParseEnvTag(tag string) EnvTag

type Equal added in v10.24.0

type Equal struct {
	Deep bool
}

Equal checks that all parameters are equal.

func (Equal) Assert added in v10.24.0

func (e Equal) Assert(items ...any) bool

func (Equal) MaxArgs added in v10.24.0

func (e Equal) MaxArgs() int

func (Equal) MinArgs added in v10.24.0

func (e Equal) MinArgs() int

func (Equal) Name added in v10.24.0

func (e Equal) Name() string

type ErrorTier added in v10.24.0

type ErrorTier uint8
const (
	// ErrorTierInconsequential means no corrective action is needed.
	ErrorTierInconsequential ErrorTier = iota
	// ErrorTierFatal means it is impossible to continue running the test.
	ErrorTierFatal
)

type ExplicitCredentialTypes added in v10.24.0

type ExplicitCredentialTypes uint8

ExplicitCredentialTypes defines a more explicit enum for credential types as AzCopy's internal definition is very loose (e.g. Anonymous can be public or SAS); accepts the URI as-is. ExplicitCredentialTypes is a set of bitflags indicating intended credential types for a test and available credential types for resources

const EExplicitCredentialType ExplicitCredentialTypes = 0

func (ExplicitCredentialTypes) AcctKey added in v10.24.0

func (ExplicitCredentialTypes) Count added in v10.24.0

func (e ExplicitCredentialTypes) Count() int

func (ExplicitCredentialTypes) GCP added in v10.24.0

func (ExplicitCredentialTypes) Includes added in v10.24.0

func (ExplicitCredentialTypes) None added in v10.24.0

func (ExplicitCredentialTypes) OAuth added in v10.24.0

func (ExplicitCredentialTypes) PublicAuth added in v10.24.0

func (ExplicitCredentialTypes) S3 added in v10.24.0

func (ExplicitCredentialTypes) SASToken added in v10.24.0

func (ExplicitCredentialTypes) String added in v10.24.0

func (e ExplicitCredentialTypes) String() string

func (ExplicitCredentialTypes) With added in v10.24.0

type FileContainerProperties added in v10.24.0

type FileContainerProperties struct {
	AccessTier       *share.AccessTier
	EnabledProtocols *string
	Quota            *int32
	RootSquash       *share.RootSquash
}

type FileObjectResourceManager added in v10.24.0

type FileObjectResourceManager struct {
	Service *FileServiceResourceManager
	Share   *FileShareResourceManager
	// contains filtered or unexported fields
}

func (*FileObjectResourceManager) Account added in v10.24.0

func (*FileObjectResourceManager) Canon added in v10.24.0

func (f *FileObjectResourceManager) Canon() string

func (*FileObjectResourceManager) ContainerName added in v10.24.0

func (f *FileObjectResourceManager) ContainerName() string

func (*FileObjectResourceManager) Create added in v10.24.0

func (*FileObjectResourceManager) DefaultAuthType added in v10.24.0

func (*FileObjectResourceManager) Delete added in v10.24.0

func (f *FileObjectResourceManager) Delete(a Asserter)

func (*FileObjectResourceManager) Download added in v10.24.0

func (*FileObjectResourceManager) EntityType added in v10.24.0

func (*FileObjectResourceManager) Exists added in v10.24.0

func (f *FileObjectResourceManager) Exists() bool

func (*FileObjectResourceManager) GetProperties added in v10.24.0

func (f *FileObjectResourceManager) GetProperties(a Asserter) (out ObjectProperties)

func (*FileObjectResourceManager) Level added in v10.24.0

func (*FileObjectResourceManager) ListChildren added in v10.24.0

func (f *FileObjectResourceManager) ListChildren(a Asserter, recursive bool) map[string]ObjectProperties

func (*FileObjectResourceManager) Location added in v10.24.0

func (*FileObjectResourceManager) ObjectName added in v10.24.0

func (f *FileObjectResourceManager) ObjectName() string

func (*FileObjectResourceManager) Parent added in v10.24.0

func (*FileObjectResourceManager) PreparePermissions added in v10.24.0

func (f *FileObjectResourceManager) PreparePermissions(a Asserter, p *string) *file.Permissions

func (*FileObjectResourceManager) ResourceClient added in v10.24.0

func (f *FileObjectResourceManager) ResourceClient() any

func (*FileObjectResourceManager) SetHTTPHeaders added in v10.24.0

func (f *FileObjectResourceManager) SetHTTPHeaders(a Asserter, h contentHeaders)

func (*FileObjectResourceManager) SetMetadata added in v10.24.0

func (f *FileObjectResourceManager) SetMetadata(a Asserter, metadata common.Metadata)

func (*FileObjectResourceManager) SetObjectProperties added in v10.24.0

func (f *FileObjectResourceManager) SetObjectProperties(a Asserter, props ObjectProperties)

func (*FileObjectResourceManager) URI added in v10.24.0

func (*FileObjectResourceManager) ValidAuthTypes added in v10.24.0

func (*FileObjectResourceManager) WithSpecificAuthType added in v10.24.0

type FileProperties added in v10.24.0

type FileProperties struct {
	FileAttributes *string
	// ChangeTime, though available on the Files service is not writeable locally, or queryable.
	// We also just do not persist it, even on Files at the moment.
	// Hence, we do not test ChangeTime.
	FileCreationTime  *time.Time
	FileLastWriteTime *time.Time
	FilePermissions   *string
}

type FileServiceResourceManager added in v10.24.0

type FileServiceResourceManager struct {
	// contains filtered or unexported fields
}

func (*FileServiceResourceManager) Account added in v10.24.0

func (*FileServiceResourceManager) Canon added in v10.24.0

func (*FileServiceResourceManager) DefaultAuthType added in v10.24.0

func (*FileServiceResourceManager) GetContainer added in v10.24.0

func (s *FileServiceResourceManager) GetContainer(container string) ContainerResourceManager

func (*FileServiceResourceManager) IsHierarchical added in v10.24.0

func (s *FileServiceResourceManager) IsHierarchical() bool

func (*FileServiceResourceManager) Level added in v10.24.0

func (*FileServiceResourceManager) ListContainers added in v10.24.0

func (s *FileServiceResourceManager) ListContainers(a Asserter) []string

func (*FileServiceResourceManager) Location added in v10.24.0

func (*FileServiceResourceManager) Parent added in v10.24.0

func (*FileServiceResourceManager) ResourceClient added in v10.24.0

func (s *FileServiceResourceManager) ResourceClient() any

func (*FileServiceResourceManager) URI added in v10.24.0

func (*FileServiceResourceManager) ValidAuthTypes added in v10.24.0

func (*FileServiceResourceManager) WithSpecificAuthType added in v10.24.0

type FileShareCreateOptions added in v10.24.0

type FileShareCreateOptions = share.CreateOptions

type FileShareDeleteOptions added in v10.24.0

type FileShareDeleteOptions = share.DeleteOptions

type FileShareResourceManager added in v10.24.0

type FileShareResourceManager struct {
	Service *FileServiceResourceManager
	// contains filtered or unexported fields
}

func (*FileShareResourceManager) Account added in v10.24.0

func (*FileShareResourceManager) Canon added in v10.24.0

func (s *FileShareResourceManager) Canon() string

func (*FileShareResourceManager) ContainerName added in v10.24.0

func (s *FileShareResourceManager) ContainerName() string

func (*FileShareResourceManager) Create added in v10.24.0

func (*FileShareResourceManager) CreateWithOptions added in v10.24.0

func (s *FileShareResourceManager) CreateWithOptions(a Asserter, options *FileShareCreateOptions)

func (*FileShareResourceManager) DefaultAuthType added in v10.24.0

func (*FileShareResourceManager) Delete added in v10.24.0

func (s *FileShareResourceManager) Delete(a Asserter)

func (*FileShareResourceManager) DeleteWithOptions added in v10.24.0

func (s *FileShareResourceManager) DeleteWithOptions(a Asserter, options *FileShareDeleteOptions)

func (*FileShareResourceManager) Exists added in v10.24.0

func (s *FileShareResourceManager) Exists() bool

func (*FileShareResourceManager) GetObject added in v10.24.0

func (*FileShareResourceManager) GetProperties added in v10.24.0

func (*FileShareResourceManager) Level added in v10.24.0

func (*FileShareResourceManager) ListObjects added in v10.24.0

func (s *FileShareResourceManager) ListObjects(a Asserter, targetDir string, recursive bool) map[string]ObjectProperties

func (*FileShareResourceManager) Location added in v10.24.0

func (*FileShareResourceManager) Parent added in v10.24.0

func (*FileShareResourceManager) ResourceClient added in v10.24.0

func (s *FileShareResourceManager) ResourceClient() any

func (*FileShareResourceManager) URI added in v10.24.0

func (*FileShareResourceManager) ValidAuthTypes added in v10.24.0

func (*FileShareResourceManager) WithSpecificAuthType added in v10.24.0

type FileSignatureValues added in v10.24.0

type FileSignatureValues interface {
	SignWithSharedKey(credential *filesas.SharedKeyCredential) (filesas.QueryParameters, error)
}

FileSignatureValues makes both account/service signature values generic for output from GenericSignatureValues

type FormattedAssertion added in v10.24.0

type FormattedAssertion interface {
	Assertion
	// Format must explain the reason for success or failure in a human-readable format.
	Format(items ...any) string
}

type FrameworkAsserter added in v10.24.0

type FrameworkAsserter struct {
	SuiteName     string // todo new naming scheme
	ScenarioName  string
	VariationName string // todo: do we just go through and use fmt.Sprint on all the objects in the variation in order?
	// contains filtered or unexported fields
}

FrameworkAsserter should only be used for the very roots of the testing framework. It should never be used inside a real test itself.

func (*FrameworkAsserter) Assert added in v10.24.0

func (ta *FrameworkAsserter) Assert(comment string, assertion Assertion, items ...any)

func (*FrameworkAsserter) AssertNow added in v10.24.0

func (ta *FrameworkAsserter) AssertNow(comment string, assertion Assertion, items ...any)

func (*FrameworkAsserter) Error added in v10.24.0

func (ta *FrameworkAsserter) Error(reason string)

func (*FrameworkAsserter) Failed added in v10.24.0

func (ta *FrameworkAsserter) Failed() bool

func (*FrameworkAsserter) GetTestName added in v10.24.0

func (ta *FrameworkAsserter) GetTestName() string

func (*FrameworkAsserter) Log added in v10.24.0

func (ta *FrameworkAsserter) Log(format string, a ...any)

func (*FrameworkAsserter) NoError added in v10.24.0

func (ta *FrameworkAsserter) NoError(comment string, err error)

func (*FrameworkAsserter) PrintFinalizingMessage added in v10.24.0

func (ta *FrameworkAsserter) PrintFinalizingMessage(reasonFormat string, a ...any)

func (*FrameworkAsserter) Skip added in v10.24.0

func (ta *FrameworkAsserter) Skip(reason string)

type GenericAccountSignatureValues added in v10.24.0

type GenericAccountSignatureValues struct {
	Version string
	// Defaults to HTTPS
	Protocol blobsas.Protocol
	// Defaults to now
	StartTime time.Time
	// Defaults to 24hr past StartTime
	ExpiryTime time.Time
	// Defaults to racwdl, uses blobsas.AccountPermissions, filesas.AccountPermissions, or datalakesas.AccountPermissions
	Permissions string
	IPRange     blobsas.IPRange
	// defaults to sco, uses blobsas.AccountResourceTypes, filesas.AccountResourceTypes, or datalakesas.AccountResourceTypes
	ResourceTypes string
}

func (GenericAccountSignatureValues) AsBlob added in v10.24.0

func (GenericAccountSignatureValues) AsDatalake added in v10.24.0

func (GenericAccountSignatureValues) AsFile added in v10.24.0

type GenericServiceSignatureValues added in v10.24.0

type GenericServiceSignatureValues struct {
	// Gets defaulted by the relevant SDK to the SDK version
	Version string
	// Protocol defaults to HTTPS.
	Protocol blobsas.Protocol
	// StartTime, if unspecified, is this moment.
	StartTime time.Time
	// ExpiryTime, if unspecified, is 24 hours from StartTime.
	ExpiryTime time.Time
	// SnapshotTime is unused on datalake, but refers to the blob snapshot time or the file share snapshot time.
	SnapshotTime time.Time
	// BlobVersion is unique to Blob.
	BlobVersion string
	// Permissions should be supplied by calling .String() on any of the below structs.
	// Blob and Datalake overlap nicely
	// blobsas.ContainerPermissions blobsas.BlobPermissions
	// filesas.SharePermissions filesas.FilePermissions
	// datalakesas.FileSystemPermissions datalakesas.FilePermissions datalakesas.DirectoryPermissions
	// If zero, defaults to racwdl (read, add, create, write, delete, list
	Permissions   string
	IPRange       blobsas.IPRange
	Identifier    string
	ContainerName string
	ObjectName    string
	// DirectoryPath is used on Blob & Datalake, and is intended to limit to a particular subdirectory.
	// On Files, replaces ObjectName if present.
	DirectoryPath        string
	CacheControl         string
	ContentDisposition   string
	ContentEncoding      string
	ContentLanguage      string
	ContentType          string
	AuthorizedObjectID   string
	UnauthorizedObjectID string
	// CorrelationID is used on Blob & Datalake
	CorrelationID string
}

GenericServiceSignatureValues is a generic struct encompassing the possible values for Blob, Files, and Datalake service SAS tokens. Check the comments within the struct for info about defaults or valid values for each service.

func (GenericServiceSignatureValues) AsBlob added in v10.24.0

func (GenericServiceSignatureValues) AsDatalake added in v10.24.0

func (GenericServiceSignatureValues) AsFile added in v10.24.0

type GenericSignatureValues added in v10.24.0

type GenericSignatureValues interface {
	AsBlob() BlobSignatureValues
	AsFile() FileSignatureValues
	AsDatalake() DatalakeSignatureValues
}

GenericSignatureValues are a set of signature values that are portable to all 3 Azure storage services and both service and account level SAS. Distinct limitations of these generic values are documented in the struct.

type GetResourceOptions added in v10.24.0

type GetResourceOptions struct {
	// Key for AccountRegistry when using account-based systems
	PreferredAccount *string
}

type GetURIOptions added in v10.24.0

type GetURIOptions struct {
	RemoteOpts RemoteURIOpts
	AzureOpts  AzureURIOpts
}

type GlobalFlags added in v10.24.0

type GlobalFlags struct {
	CapMbps          *float64 `flag:"cap-mbps"`
	TrustedSuffixes  []string `flag:"trusted-microsoft-suffixes"`
	SkipVersionCheck *bool    `flag:"skip-version-check"`

	OutputType  *common.OutputFormat    `flag:"output-type,default:json"`
	LogLevel    *common.LogLevel        `flag:"log-level,default:DEBUG"`
	OutputLevel *common.OutputVerbosity `flag:"output-level,default:DEFAULT"`

	// TODO: handle prompting and input; WI#26475441
	//CancelFromStdin *bool `flag:"cancel-from-stdin"`
	AwaitContinue *bool `flag:"await-continue,defaultfunc:DefaultAwaitContinue"`
}

func (GlobalFlags) DefaultAwaitContinue added in v10.24.0

func (GlobalFlags) DefaultAwaitContinue(a ScenarioAsserter) string

type GlobalInputManager

type GlobalInputManager struct{}

clearly define all the inputs to the end-to-end tests it's ok to panic if the inputs are absolutely required the general guidance is to take in as few parameters as possible

func (GlobalInputManager) GetAccountAndKey

func (GlobalInputManager) GetAccountAndKey(accountType AccountType) (string, string)

func (GlobalInputManager) GetExecutablePath

func (GlobalInputManager) GetExecutablePath() string

func (GlobalInputManager) GetMDConfig added in v10.16.1

func (gim GlobalInputManager) GetMDConfig(accountType AccountType) (*ManagedDiskConfig, error)

func (GlobalInputManager) GetServicePrincipalAuth added in v10.15.0

func (GlobalInputManager) GetServicePrincipalAuth() (tenantID string, applicationID string, clientSecret string)

func (GlobalInputManager) KeepFailedData

func (GlobalInputManager) KeepFailedData() bool

func (GlobalInputManager) SetupClassicOAuthCache added in v10.24.0

func (gim GlobalInputManager) SetupClassicOAuthCache() error

func (GlobalInputManager) TestSummaryLogPath

func (GlobalInputManager) TestSummaryLogPath() string

type IsNil added in v10.24.0

type IsNil struct{}

IsNil checks that all parameters are nil.

func (IsNil) Assert added in v10.24.0

func (i IsNil) Assert(items ...any) bool

func (IsNil) MaxArgs added in v10.24.0

func (i IsNil) MaxArgs() int

func (IsNil) MinArgs added in v10.24.0

func (i IsNil) MinArgs() int

func (IsNil) Name added in v10.24.0

func (i IsNil) Name() string

type JobsShowCommandResult

type JobsShowCommandResult struct {
	// contains filtered or unexported fields
}

type LocalContainerResourceManager added in v10.24.0

type LocalContainerResourceManager struct {
	RootPath string
}

LocalContainerResourceManager is effectively just the root temp folder for a transfer.

func (*LocalContainerResourceManager) Account added in v10.24.0

func (*LocalContainerResourceManager) Canon added in v10.24.0

func (*LocalContainerResourceManager) ContainerName added in v10.24.0

func (l *LocalContainerResourceManager) ContainerName() string

func (*LocalContainerResourceManager) Create added in v10.24.0

func (*LocalContainerResourceManager) Delete added in v10.24.0

func (*LocalContainerResourceManager) Exists added in v10.24.0

func (l *LocalContainerResourceManager) Exists() bool

func (*LocalContainerResourceManager) GetObject added in v10.24.0

func (*LocalContainerResourceManager) GetProperties added in v10.24.0

func (*LocalContainerResourceManager) Level added in v10.24.0

func (*LocalContainerResourceManager) ListObjects added in v10.24.0

func (l *LocalContainerResourceManager) ListObjects(a Asserter, prefixOrDirectory string, recursive bool) map[string]ObjectProperties

func (*LocalContainerResourceManager) Location added in v10.24.0

func (*LocalContainerResourceManager) Parent added in v10.24.0

func (*LocalContainerResourceManager) URI added in v10.24.0

type LocalObjectResourceManager added in v10.24.0

type LocalObjectResourceManager struct {
	// contains filtered or unexported fields
}

func (*LocalObjectResourceManager) Account added in v10.24.0

func (*LocalObjectResourceManager) Canon added in v10.24.0

func (*LocalObjectResourceManager) ContainerName added in v10.24.0

func (l *LocalObjectResourceManager) ContainerName() string

func (*LocalObjectResourceManager) Create added in v10.24.0

func (*LocalObjectResourceManager) Delete added in v10.24.0

func (l *LocalObjectResourceManager) Delete(a Asserter)

func (*LocalObjectResourceManager) Download added in v10.24.0

func (*LocalObjectResourceManager) EntityType added in v10.24.0

func (*LocalObjectResourceManager) Exists added in v10.24.0

func (l *LocalObjectResourceManager) Exists() bool

func (*LocalObjectResourceManager) GetProperties added in v10.24.0

func (*LocalObjectResourceManager) Level added in v10.24.0

func (*LocalObjectResourceManager) ListChildren added in v10.24.0

func (l *LocalObjectResourceManager) ListChildren(a Asserter, recursive bool) map[string]ObjectProperties

func (*LocalObjectResourceManager) Location added in v10.24.0

func (*LocalObjectResourceManager) ObjectName added in v10.24.0

func (l *LocalObjectResourceManager) ObjectName() string

func (*LocalObjectResourceManager) Parent added in v10.24.0

func (*LocalObjectResourceManager) SetHTTPHeaders added in v10.24.0

func (l *LocalObjectResourceManager) SetHTTPHeaders(a Asserter, h contentHeaders)

func (*LocalObjectResourceManager) SetMetadata added in v10.24.0

func (l *LocalObjectResourceManager) SetMetadata(a Asserter, metadata common.Metadata)

func (*LocalObjectResourceManager) SetObjectProperties added in v10.24.0

func (l *LocalObjectResourceManager) SetObjectProperties(a Asserter, props ObjectProperties)

func (*LocalObjectResourceManager) URI added in v10.24.0

type ManagedDiskConfig added in v10.16.1

type ManagedDiskConfig struct {
	SubscriptionID    string
	ResourceGroupName string
	DiskName          string
	// contains filtered or unexported fields
}

{"SubscriptionID":"","ResourceGroupName":"","DiskName":""}

func (*ManagedDiskConfig) GetAccess added in v10.16.1

func (config *ManagedDiskConfig) GetAccess() (*url.URL, error)

func (*ManagedDiskConfig) GetMDURL added in v10.16.1

func (config *ManagedDiskConfig) GetMDURL() (*url.URL, error)

func (*ManagedDiskConfig) RevokeAccess added in v10.16.1

func (config *ManagedDiskConfig) RevokeAccess() error

type ManagedDiskGetAccessResponse added in v10.16.1

type ManagedDiskGetAccessResponse struct {
	AccessSAS             string `json:"accessSAS"`
	SecurityDataAccessSAS string `json:"securityDataAccessSAS"`
}

type MatchedResourceDefinition added in v10.24.0

type MatchedResourceDefinition[T ResourceManager] interface {
	ResourceDefinition
	// contains filtered or unexported methods
}

type MockAccountResourceManager added in v10.24.0

type MockAccountResourceManager struct {
	// contains filtered or unexported fields
}

func (*MockAccountResourceManager) AccountName added in v10.24.0

func (m *MockAccountResourceManager) AccountName() string

func (*MockAccountResourceManager) AccountType added in v10.24.0

func (m *MockAccountResourceManager) AccountType() AccountType

func (*MockAccountResourceManager) AvailableServices added in v10.24.0

func (m *MockAccountResourceManager) AvailableServices() []common.Location

func (*MockAccountResourceManager) GetService added in v10.24.0

type MockContainerResourceManager added in v10.24.0

type MockContainerResourceManager struct {
	// contains filtered or unexported fields
}

func (*MockContainerResourceManager) Account added in v10.24.0

func (*MockContainerResourceManager) Canon added in v10.24.0

func (*MockContainerResourceManager) ContainerName added in v10.24.0

func (m *MockContainerResourceManager) ContainerName() string

func (*MockContainerResourceManager) Create added in v10.24.0

func (*MockContainerResourceManager) DefaultAuthType added in v10.24.0

func (*MockContainerResourceManager) Delete added in v10.24.0

func (*MockContainerResourceManager) Exists added in v10.24.0

func (m *MockContainerResourceManager) Exists() bool

func (*MockContainerResourceManager) GetObject added in v10.24.0

func (*MockContainerResourceManager) GetProperties added in v10.24.0

func (*MockContainerResourceManager) GetResourceTarget added in v10.24.0

func (m *MockContainerResourceManager) GetResourceTarget(a Asserter) string

func (*MockContainerResourceManager) Level added in v10.24.0

func (*MockContainerResourceManager) ListObjects added in v10.24.0

func (m *MockContainerResourceManager) ListObjects(a Asserter, prefixOrDirectory string, recursive bool) map[string]ObjectProperties

func (*MockContainerResourceManager) Location added in v10.24.0

func (*MockContainerResourceManager) Parent added in v10.24.0

func (*MockContainerResourceManager) ResourceClient added in v10.24.0

func (m *MockContainerResourceManager) ResourceClient() any

func (*MockContainerResourceManager) URI added in v10.24.0

func (*MockContainerResourceManager) ValidAuthTypes added in v10.24.0

func (*MockContainerResourceManager) WithSpecificAuthType added in v10.24.0

type MockObjectResourceManager added in v10.24.0

type MockObjectResourceManager struct {
	// contains filtered or unexported fields
}

func (*MockObjectResourceManager) Account added in v10.24.0

func (*MockObjectResourceManager) Canon added in v10.24.0

func (m *MockObjectResourceManager) Canon() string

func (*MockObjectResourceManager) ContainerName added in v10.24.0

func (m *MockObjectResourceManager) ContainerName() string

func (*MockObjectResourceManager) Create added in v10.24.0

func (*MockObjectResourceManager) DefaultAuthType added in v10.24.0

func (*MockObjectResourceManager) Delete added in v10.24.0

func (m *MockObjectResourceManager) Delete(a Asserter)

func (*MockObjectResourceManager) Download added in v10.24.0

func (*MockObjectResourceManager) EntityType added in v10.24.0

func (*MockObjectResourceManager) Exists added in v10.24.0

func (m *MockObjectResourceManager) Exists() bool

func (*MockObjectResourceManager) GetProperties added in v10.24.0

func (*MockObjectResourceManager) Level added in v10.24.0

func (*MockObjectResourceManager) ListChildren added in v10.24.0

func (m *MockObjectResourceManager) ListChildren(a Asserter, recursive bool) map[string]ObjectProperties

func (*MockObjectResourceManager) Location added in v10.24.0

func (*MockObjectResourceManager) ObjectName added in v10.24.0

func (m *MockObjectResourceManager) ObjectName() string

func (*MockObjectResourceManager) Parent added in v10.24.0

func (*MockObjectResourceManager) ResourceClient added in v10.24.0

func (m *MockObjectResourceManager) ResourceClient() any

func (*MockObjectResourceManager) SetHTTPHeaders added in v10.24.0

func (m *MockObjectResourceManager) SetHTTPHeaders(a Asserter, h contentHeaders)

func (*MockObjectResourceManager) SetMetadata added in v10.24.0

func (m *MockObjectResourceManager) SetMetadata(a Asserter, metadata common.Metadata)

func (*MockObjectResourceManager) SetObjectProperties added in v10.24.0

func (m *MockObjectResourceManager) SetObjectProperties(a Asserter, props ObjectProperties)

func (*MockObjectResourceManager) URI added in v10.24.0

func (*MockObjectResourceManager) ValidAuthTypes added in v10.24.0

func (*MockObjectResourceManager) WithSpecificAuthType added in v10.24.0

type MockServiceResourceManager added in v10.24.0

type MockServiceResourceManager struct {
	// contains filtered or unexported fields
}

func (*MockServiceResourceManager) Account added in v10.24.0

func (*MockServiceResourceManager) Canon added in v10.24.0

func (*MockServiceResourceManager) DefaultAuthType added in v10.24.0

func (*MockServiceResourceManager) GetContainer added in v10.24.0

func (*MockServiceResourceManager) GetResourceTarget added in v10.24.0

func (m *MockServiceResourceManager) GetResourceTarget(a Asserter) string

func (*MockServiceResourceManager) IsHierarchical added in v10.24.0

func (m *MockServiceResourceManager) IsHierarchical() bool

func (*MockServiceResourceManager) Level added in v10.24.0

func (*MockServiceResourceManager) ListContainers added in v10.24.0

func (m *MockServiceResourceManager) ListContainers(a Asserter) []string

func (*MockServiceResourceManager) Location added in v10.24.0

func (*MockServiceResourceManager) Parent added in v10.24.0

func (*MockServiceResourceManager) ResourceClient added in v10.24.0

func (m *MockServiceResourceManager) ResourceClient() any

func (*MockServiceResourceManager) URI added in v10.24.0

func (*MockServiceResourceManager) ValidAuthTypes added in v10.24.0

func (*MockServiceResourceManager) WithSpecificAuthType added in v10.24.0

type MultiStepUploader added in v10.24.0

type MultiStepUploader struct {
	Init        func(size int64) error
	UploadRange func(block io.ReadSeekCloser, state MultiStepUploaderState) error
	Finalize    func() error
	BlockSize   int64
	Parallel    bool
}

func (*MultiStepUploader) GetBlockCount added in v10.24.0

func (m *MultiStepUploader) GetBlockCount(size int64) int64

func (*MultiStepUploader) UploadContents added in v10.24.0

func (m *MultiStepUploader) UploadContents(content ObjectContentContainer) error

type MultiStepUploaderState added in v10.24.0

type MultiStepUploaderState struct {
	BlockSize  int64
	Offset     int64
	BlockIndex int64
	BlockCount int64
}

type NewE2EConfig added in v10.24.0

type NewE2EConfig struct {
	E2EAuthConfig struct {
		SubscriptionLoginInfo struct {
			SubscriptionID string `env:"NEW_E2E_SUBSCRIPTION_ID,required"`
			ApplicationID  string `env:"NEW_E2E_APPLICATION_ID,required"`
			ClientSecret   string `env:"NEW_E2E_CLIENT_SECRET,required"`
			TenantID       string `env:"NEW_E2E_TENANT_ID"`
		} `env:",required"`

		StaticStgAcctInfo struct {
			StaticOAuth struct {
				TenantID      string `env:"NEW_E2E_STATIC_TENANT_ID"`
				ApplicationID string `env:"NEW_E2E_STATIC_APPLICATION_ID,required"`
				ClientSecret  string `env:"NEW_E2E_STATIC_CLIENT_SECRET,required"`
			}

			// todo: should we automate this somehow? Currently each of these accounts needs some marginal boilerplate.
			Standard struct {
				AccountName string `env:"NEW_E2E_STANDARD_ACCOUNT_NAME,required"`
				AccountKey  string `env:"NEW_E2E_STANDARD_ACCOUNT_KEY,required"`
			} `env:",required"`
			HNS struct {
				AccountName string `env:"NEW_E2E_HNS_ACCOUNT_NAME,required"`
				AccountKey  string `env:"NEW_E2E_HNS_ACCOUNT_KEY,required"`
			} `env:",required"`
		} `env:",required,minimum_required=1"`
	} `env:",required,mutually_exclusive"`
	AzCopyExecutableConfig struct {
		ExecutablePath      string `env:"NEW_E2E_AZCOPY_PATH,required"`
		AutobuildExecutable bool   `env:"NEW_E2E_AUTOBUILD_AZCOPY,default=true"` // todo: make this work. It does not as of 11-21-23
	} `env:",required"`
}
var GlobalConfig NewE2EConfig

func (NewE2EConfig) StaticResources added in v10.24.0

func (e NewE2EConfig) StaticResources() bool

type NoError added in v10.24.0

type NoError struct {
	// contains filtered or unexported fields
}

NoError works like IsNil but only asserts when there is an error, and formats errors

func (NoError) Assert added in v10.24.0

func (n NoError) Assert(items ...any) bool

func (NoError) Format added in v10.24.0

func (n NoError) Format(items ...any) string

func (NoError) MaxArgs added in v10.24.0

func (n NoError) MaxArgs() int

func (NoError) MinArgs added in v10.24.0

func (n NoError) MinArgs() int

func (NoError) Name added in v10.24.0

func (n NoError) Name() string

type Not added in v10.24.0

type Not struct {
	// contains filtered or unexported fields
}

Not inverts the contained Assertion.

func (Not) Assert added in v10.24.0

func (n Not) Assert(items ...any) bool

func (Not) MaxArgs added in v10.24.0

func (n Not) MaxArgs() int

func (Not) MinArgs added in v10.24.0

func (n Not) MinArgs() int

func (Not) Name added in v10.24.0

func (n Not) Name() string

type OAuthCache added in v10.24.0

type OAuthCache struct {
	// contains filtered or unexported fields
}
var ClassicE2EOAuthCache *OAuthCache
var PrimaryOAuthCache *OAuthCache

func NewOAuthCache added in v10.24.0

func NewOAuthCache(cred azcore.TokenCredential, tenant string) *OAuthCache

func (*OAuthCache) GetAccessToken added in v10.24.0

func (o *OAuthCache) GetAccessToken(scope string) (*AzCoreAccessToken, error)

type ObjectContentContainer added in v10.24.0

type ObjectContentContainer interface {
	Size() int64
	Reader() io.ReadSeeker
}

func NewRandomObjectContentContainer added in v10.24.0

func NewRandomObjectContentContainer(a Asserter, size int64) ObjectContentContainer

func NewStringObjectContentContainer added in v10.24.0

func NewStringObjectContentContainer(data string) ObjectContentContainer

func NewZeroObjectContentContainer added in v10.24.0

func NewZeroObjectContentContainer(size int64) ObjectContentContainer

type ObjectContentContainerBuffer added in v10.24.0

type ObjectContentContainerBuffer struct {
	Data []byte
}

func (*ObjectContentContainerBuffer) Reader added in v10.24.0

func (*ObjectContentContainerBuffer) Size added in v10.24.0

type ObjectProperties added in v10.24.0

type ObjectProperties struct {
	EntityType  common.EntityType
	HTTPHeaders contentHeaders
	Metadata    common.Metadata

	BlobProperties   BlobProperties
	BlobFSProperties BlobFSProperties
	FileProperties   FileProperties
}

type ObjectResourceManager added in v10.24.0

type ObjectResourceManager interface {
	ResourceManager

	EntityType() common.EntityType
	ContainerName() string
	ObjectName() string
	// Create attempts to create an object. Should overwrite objects if they already exist. It is expected to attempt to track object creation.
	Create(a Asserter, body ObjectContentContainer, properties ObjectProperties)
	// Delete attempts to delete an object. NotFound type errors are ignored.
	Delete(a Asserter)

	// ListChildren will fail if EntityType is not a folder and the service is hierarchical.
	// The map will be relative to the object.
	ListChildren(a Asserter, recursive bool) map[string]ObjectProperties

	GetProperties(a Asserter) ObjectProperties

	SetHTTPHeaders(a Asserter, h contentHeaders)
	SetMetadata(a Asserter, metadata common.Metadata)
	SetObjectProperties(a Asserter, props ObjectProperties)

	Download(a Asserter) io.ReadSeeker

	// Exists determines if the object in question exists
	Exists() bool
}

type ObjectResourceMapping added in v10.24.0

type ObjectResourceMapping interface {
	// Flatten returns a set of objects, flat mapped, as the root of container space.
	// "" is the root, or self. This is useful for setting folder properties, or creating single files under folders.
	Flatten() map[string]ResourceDefinitionObject
}

type ObjectResourceMappingFlat added in v10.24.0

type ObjectResourceMappingFlat map[string]ResourceDefinitionObject // todo: convert to hierarchical?

func (ObjectResourceMappingFlat) Flatten added in v10.24.0

type ObjectResourceMappingFolder added in v10.24.0

type ObjectResourceMappingFolder struct {
	ResourceDefinitionObject
	Children map[string]ObjectResourceMapping
}

func (ObjectResourceMappingFolder) Flatten added in v10.24.0

type ObjectResourceMappingObject added in v10.24.0

type ObjectResourceMappingObject ResourceDefinitionObject

func (ObjectResourceMappingObject) Flatten added in v10.24.0

type Operation

type Operation uint8

func (Operation) Benchmark added in v10.23.0

func (Operation) Benchmark() Operation

func (Operation) Cancel added in v10.23.0

func (Operation) Cancel() Operation

func (Operation) Copy

func (Operation) Copy() Operation

func (Operation) CopyAndSync

func (Operation) CopyAndSync() Operation

func (Operation) List added in v10.24.0

func (Operation) List() Operation

func (Operation) NeedsDst added in v10.24.0

func (o Operation) NeedsDst() bool

func (Operation) Remove

func (Operation) Remove() Operation

func (Operation) Resume added in v10.12.0

func (Operation) Resume() Operation

func (Operation) String

func (o Operation) String() string

func (Operation) Sync

func (Operation) Sync() Operation

type PathTrie added in v10.24.0

type PathTrie[T any] struct {
	Nodes *TrieNode[T]
	Sep   rune
}

func NewTrie added in v10.24.0

func NewTrie[T any](Separator rune) *PathTrie[T]

func (*PathTrie[T]) Get added in v10.24.0

func (t *PathTrie[T]) Get(path string) *T

func (*PathTrie[T]) Insert added in v10.24.0

func (t *PathTrie[T]) Insert(path string, data *T)

func (*PathTrie[T]) Remove added in v10.24.0

func (t *PathTrie[T]) Remove(path string)

func (*PathTrie[T]) Traverse added in v10.24.0

func (t *PathTrie[T]) Traverse(traversalFunc func(data *T) TraversalOperation)

type PropertiesAvailability added in v10.24.0

type PropertiesAvailability uint8
const (
	PropertiesAvailabilityNone PropertiesAvailability = iota
	PropertiesAvailabilityReadOnly
	PropertiesAvailabilityReadWrite
)

type RemoteResourceManager added in v10.24.0

type RemoteResourceManager interface {
	ResourceManager

	// ValidAuthTypes specifies acceptable auth types to use
	ValidAuthTypes() ExplicitCredentialTypes
	// DefaultAuthType should return the resource's logical default auth type (e.g. SAS)
	DefaultAuthType() ExplicitCredentialTypes
	// WithSpecificAuthType should return a copy of itself with a specific auth type, intended for RunAzCopy
	WithSpecificAuthType(cred ExplicitCredentialTypes, a Asserter, opts ...CreateAzCopyTargetOptions) AzCopyTarget
	// ResourceClient attempts to return the native resource client, and should be wrangled by a caller knowing what they're expecting.
	ResourceClient() any
}

type RemoteURIOpts added in v10.24.0

type RemoteURIOpts struct {
	// Defaults as https
	Scheme string
}

type RemoveFlags added in v10.24.0

type RemoveFlags struct {
	GlobalFlags
	CommonFilterFlags

	Recursive       *bool                         `flag:"recursive"`
	ForceIfReadOnly *bool                         `flag:"force-if-read-only"`
	ListOfFiles     []string                      `flag:"list-of-files"`
	ListOfVersions  []string                      `flag:"list-of-versions"`
	DryRun          *bool                         `flag:"dry-run"`
	FromTo          *common.FromTo                `flag:"from-to"`
	PermanentDelete *common.PermanentDeleteOption `flag:"permanent-delete"`
	TrailingDot     *common.TrailingDotOption     `flag:"trailing-dot"`
	CPKByName       *string                       `flag:"cpk-by-name"`
	CPKByValue      *bool                         `flag:"cpk-by-value"`
}

RemoveFlags is not tiered like CopySyncCommonFlags is, because it is dissimilar in functionality, and would be hard to test in the same scenario.

func (RemoveFlags) SerializeListingFile added in v10.24.0

func (r RemoveFlags) SerializeListingFile(in any, scenarioAsserter ScenarioAsserter)

type ResourceDefinition added in v10.24.0

type ResourceDefinition interface {
	// DefinitionTarget returns the location level this definition applies at.
	DefinitionTarget() cmd.LocationLevel
	// GenerateAdoptiveParent is designed for scaling a definition down to a root resource for creation
	GenerateAdoptiveParent(a Asserter) ResourceDefinition
	// MatchAdoptiveChild scales a resource of the same level up one level to the real definition level
	MatchAdoptiveChild(a Asserter, target ResourceManager) (ResourceManager, ResourceDefinition)
	// ApplyDefinition manages tree traversal by itself. applicationFunctions should realistically be creation of the underlying resource or validation.
	ApplyDefinition(a Asserter, target ResourceManager, applicationFunctions map[cmd.LocationLevel]func(Asserter, ResourceManager, ResourceDefinition))
	// ShouldExist determines whether the resource should exist.
	// This should be checked in functions called by ApplyDefinition, as it is intended to alter creation and validation behavior.
	ShouldExist() bool
}

ResourceDefinition itself exists to loosely accept the handful of relevant types as a part of CreateResource and ValidateResource.

type ResourceDefinitionContainer added in v10.24.0

type ResourceDefinitionContainer struct {
	// ContainerName is overwritten if used as a part of a parent definition
	ContainerName *string
	Properties    ContainerProperties

	Objects ObjectResourceMapping
	// ContainerShouldExist is true unless set to false. Useful in negative validation (e.g. remove)
	ContainerShouldExist *bool
}

func (ResourceDefinitionContainer) ApplyDefinition added in v10.24.0

func (r ResourceDefinitionContainer) ApplyDefinition(a Asserter, target ResourceManager, applicationFunctions map[cmd.LocationLevel]func(Asserter, ResourceManager, ResourceDefinition))

func (ResourceDefinitionContainer) DefinitionTarget added in v10.24.0

func (r ResourceDefinitionContainer) DefinitionTarget() cmd.LocationLevel

func (ResourceDefinitionContainer) GenerateAdoptiveParent added in v10.24.0

func (r ResourceDefinitionContainer) GenerateAdoptiveParent(a Asserter) ResourceDefinition

func (ResourceDefinitionContainer) MatchAdoptiveChild added in v10.24.0

func (ResourceDefinitionContainer) ShouldExist added in v10.24.0

func (r ResourceDefinitionContainer) ShouldExist() bool

type ResourceDefinitionObject added in v10.24.0

type ResourceDefinitionObject struct {
	// ObjectName is overwritten if used as a part of a parent definition
	ObjectName *string

	ObjectProperties
	Body ObjectContentContainer
	// ObjectShouldExist is true unless set to false. Useful in negative validation (e.g. remove)
	ObjectShouldExist *bool
}

func (ResourceDefinitionObject) ApplyDefinition added in v10.24.0

func (r ResourceDefinitionObject) ApplyDefinition(a Asserter, target ResourceManager, applicationFunctions map[cmd.LocationLevel]func(Asserter, ResourceManager, ResourceDefinition))

func (ResourceDefinitionObject) DefinitionTarget added in v10.24.0

func (r ResourceDefinitionObject) DefinitionTarget() cmd.LocationLevel

func (ResourceDefinitionObject) GenerateAdoptiveParent added in v10.24.0

func (r ResourceDefinitionObject) GenerateAdoptiveParent(a Asserter) ResourceDefinition

func (ResourceDefinitionObject) MatchAdoptiveChild added in v10.24.0

func (ResourceDefinitionObject) ShouldExist added in v10.24.0

func (r ResourceDefinitionObject) ShouldExist() bool

type ResourceDefinitionService added in v10.24.0

type ResourceDefinitionService struct {
	//Location   common.Location // todo do we want/need this? does it make sense? CreateResource currently takes a ResourceManager, which can't target an AccountResourceManager because definitions differ
	Containers map[string]ResourceDefinitionContainer
}

func (ResourceDefinitionService) ApplyDefinition added in v10.24.0

func (r ResourceDefinitionService) ApplyDefinition(a Asserter, target ResourceManager, applicationFunctions map[cmd.LocationLevel]func(Asserter, ResourceManager, ResourceDefinition))

func (ResourceDefinitionService) DefinitionTarget added in v10.24.0

func (r ResourceDefinitionService) DefinitionTarget() cmd.LocationLevel

func (ResourceDefinitionService) GenerateAdoptiveParent added in v10.24.0

func (r ResourceDefinitionService) GenerateAdoptiveParent(a Asserter) ResourceDefinition

func (ResourceDefinitionService) MatchAdoptiveChild added in v10.24.0

func (ResourceDefinitionService) ShouldExist added in v10.24.0

func (r ResourceDefinitionService) ShouldExist() bool

type ResourceManager added in v10.24.0

type ResourceManager interface {
	Location() common.Location
	Level() cmd.LocationLevel

	// URI gets the resource "URI", either a local path or a remote URL.
	// This should panic if things fail or make no sense, as a sanity check to the test author.
	URI(opts ...GetURIOptions) string

	// Parent specifies the parent resource manager, for the purposes of building a tree.
	// Can return nil, indicating this is the root of the tree.
	Parent() ResourceManager
	// Account specifies the parent account.
	// Can return nil, indicating there is no associated account
	Account() AccountResourceManager

	/*Canon specifies an object's canonical location in the resource tree created by a test.

	A Canon string is a `/` delimited list of parents up to the final element, representing the resource itself.
	The format goes
	<account>/<location>/<container>/<object>

	For locations where an account does not exist (e.g. local), substitute account with "accountless".
	e.g. accountless/Local/<tmpdirname>/<object>

	For flat namespaces, e.g. raw blob, / is ignored past objects, as it gets no more granular.
	*/
	Canon() string
}

func GetRootResource added in v10.24.0

func GetRootResource(a Asserter, location common.Location, varOpts ...GetResourceOptions) ResourceManager

GetRootResource differs from CreateResource, in that GetRootResource obtains the lowest possible resource for a particular location This eases the act of getting a base resource for tests that might utilize multiple "kinds" of resources (e.g. Local, Azure) interchangeably. on *Local*, this inherently creates a container. But that's fine, because it's likely to be used.

type ResourceTracker added in v10.24.0

type ResourceTracker interface {
	TrackCreatedResource(manager ResourceManager)
	TrackCreatedAccount(account AccountResourceManager)
}

ResourceTracker tracks resources

type ScenarioAsserter added in v10.24.0

type ScenarioAsserter interface {
	DryrunAsserter

	Cleanup(func(a ScenarioAsserter))
}

type ScenarioManager added in v10.24.0

type ScenarioManager struct {
	Func reflect.Value
	// contains filtered or unexported fields
}

func NewScenarioManager added in v10.24.0

func NewScenarioManager(t *testing.T, targetFunc reflect.Value) *ScenarioManager

func (*ScenarioManager) NewVariation added in v10.24.0

func (sm *ScenarioManager) NewVariation(origin *ScenarioVariationManager, id string, setting []any)

func (*ScenarioManager) RunScenario added in v10.24.0

func (sm *ScenarioManager) RunScenario()

type ScenarioPipelineOptions added in v10.24.0

type ScenarioPipelineOptions struct {
	Parallelized *bool
}

func (*ScenarioPipelineOptions) IsParallel added in v10.24.0

func (spo *ScenarioPipelineOptions) IsParallel() bool

type ScenarioVariationManager added in v10.24.0

type ScenarioVariationManager struct {

	// Parent refers to the running scenario.
	Parent *ScenarioManager
	// VariationData is a mapping of IDs to values, in order.
	VariationData *VariationDataContainer // todo call order, prepared options

	// wetrun data
	CreatedResources *PathTrie[createdResource]
	// contains filtered or unexported fields
}

ScenarioVariationManager manages one specific variation of a scenario.

func (*ScenarioVariationManager) Assert added in v10.24.0

func (svm *ScenarioVariationManager) Assert(comment string, assertion Assertion, items ...any)

func (*ScenarioVariationManager) AssertNow added in v10.24.0

func (svm *ScenarioVariationManager) AssertNow(comment string, assertion Assertion, items ...any)

func (*ScenarioVariationManager) Cleanup added in v10.24.0

func (svm *ScenarioVariationManager) Cleanup(cleanupFunc func(a ScenarioAsserter))

func (*ScenarioVariationManager) DeleteCreatedResources added in v10.24.0

func (svm *ScenarioVariationManager) DeleteCreatedResources()

func (*ScenarioVariationManager) Dryrun added in v10.24.0

func (svm *ScenarioVariationManager) Dryrun() bool

func (*ScenarioVariationManager) Error added in v10.24.0

func (svm *ScenarioVariationManager) Error(reason string)

func (*ScenarioVariationManager) Failed added in v10.24.0

func (svm *ScenarioVariationManager) Failed() bool

func (*ScenarioVariationManager) GetVariation added in v10.24.0

func (svm *ScenarioVariationManager) GetVariation(ID string, options []any) any

GetVariation acts as a simple dictionary for IDs to variations. If no variation with the related ID is found

func (*ScenarioVariationManager) GetVariationCallerID added in v10.24.0

func (svm *ScenarioVariationManager) GetVariationCallerID() (callerID string)

GetVariationCallerID builds a raw caller ID based upon the current call stack. It returns an incremented caller ID (e.g. with the ";calls=n" suffix).

func (*ScenarioVariationManager) InsertVariationSeparator added in v10.24.0

func (svm *ScenarioVariationManager) InsertVariationSeparator(sep string)

InsertVariationSeparator is mostly used to clean up variation names (e.g. rather than BlobBlobCopy, Blob->Blob_Copy)

func (*ScenarioVariationManager) Invalid added in v10.24.0

func (svm *ScenarioVariationManager) Invalid() bool

func (*ScenarioVariationManager) InvalidateScenario added in v10.24.0

func (svm *ScenarioVariationManager) InvalidateScenario()

func (*ScenarioVariationManager) Log added in v10.24.0

func (svm *ScenarioVariationManager) Log(format string, a ...any)

func (*ScenarioVariationManager) NoError added in v10.24.0

func (svm *ScenarioVariationManager) NoError(comment string, err error)

func (*ScenarioVariationManager) Skip added in v10.24.0

func (svm *ScenarioVariationManager) Skip(reason string)

func (*ScenarioVariationManager) TrackCreatedAccount added in v10.24.0

func (svm *ScenarioVariationManager) TrackCreatedAccount(account AccountResourceManager)

func (*ScenarioVariationManager) TrackCreatedResource added in v10.24.0

func (svm *ScenarioVariationManager) TrackCreatedResource(manager ResourceManager)

func (*ScenarioVariationManager) VariationName added in v10.24.0

func (svm *ScenarioVariationManager) VariationName() string

type ServiceResourceManager added in v10.24.0

type ServiceResourceManager interface {
	ResourceManager
	RemoteResourceManager

	ListContainers(a Asserter) []string
	GetContainer(string) ContainerResourceManager
	IsHierarchical() bool
}

type SuiteManager added in v10.24.0

type SuiteManager struct {
	Suites           map[string]any
	ScenarioManagers map[string]any
	// contains filtered or unexported fields
}

func (*SuiteManager) RegisterSuite added in v10.24.0

func (sm *SuiteManager) RegisterSuite(Suite any)

func (*SuiteManager) RunSuites added in v10.24.0

func (sm *SuiteManager) RunSuites(t *testing.T)

type SyncFlags added in v10.24.0

type SyncFlags struct {
	CopySyncCommonFlags

	DeleteDestination    *bool                   `flag:"delete-destination"`
	MirrorMode           *bool                   `flag:"mirror-mode"`
	CompareHash          *common.SyncHashType    `flag:"compare-hash"`
	LocalHashDir         *string                 `flag:"hash-meta-dir"`
	LocalHashStorageMode *common.HashStorageMode `flag:"local-hash-storage-mode"`
}

type TestFromTo

type TestFromTo struct {
	// contains filtered or unexported fields
}

TestFromTo is similar to common/FromTo, except that it can have cases where one value represents many possibilities

func NewTestFromTo

func NewTestFromTo(desc string, useAllTos bool, froms []common.Location, tos []common.Location) TestFromTo

func (TestFromTo) AllAzureS2S

func (TestFromTo) AllAzureS2S() TestFromTo

AllAzureS2S is like AllS2S, but it excludes non-Azure sources. (No need to exclude non-Azure destinations, since AzCopy doesn't have those)

func (TestFromTo) AllDownloads

func (TestFromTo) AllDownloads() TestFromTo

AllDownloads represents the subset of AllPairs that are downloads

func (TestFromTo) AllPairs

func (TestFromTo) AllPairs() TestFromTo

AllPairs tests literally all Source/Dest pairings that are supported by AzCopy. Use this sparingly, because it runs a lot of cases. Prefer AllSourcesToOneDest or AllSourcesDownAndS2S or similar.

func (TestFromTo) AllRemove

func (TestFromTo) AllRemove() TestFromTo

AllRemove represents the subset of AllPairs that are remove/delete

func (TestFromTo) AllS2S

func (TestFromTo) AllS2S() TestFromTo

AllS2S represents the subset of AllPairs that are S2S transfers

func (TestFromTo) AllSourcesDownAndS2S

func (TestFromTo) AllSourcesDownAndS2S() TestFromTo

AllSourcesDownAndS2S means use all possible sources, and for each to both Blob and a download to local (except when not applicable. E.g. local source doesn't support download; AzCopy's ADLS Gen doesn't (currently) support S2S. This is a good general purpose choice, because it lets you do exercise things fairly comprehensively without actually getting into all pairwise combinations

func (TestFromTo) AllSourcesToOneDest

func (TestFromTo) AllSourcesToOneDest() TestFromTo

AllSourcesToOneDest means use all possible sources, and test each source to one destination (generally Blob is the destination, except for sources that don't support Blob, in which case, a download to local is done). Use this for tests that are primarily about enumeration of the source (rather than support for a wide range of destinations)

func (TestFromTo) AllSync added in v10.11.0

func (TestFromTo) AllSync() TestFromTo

func (TestFromTo) AllUploads

func (TestFromTo) AllUploads() TestFromTo

AllUploads represents the subset of AllPairs that are uploads

func (TestFromTo) Other

func (TestFromTo) Other(values ...common.FromTo) TestFromTo

Other is for when you want to list one or more specific from-tos that the test should cover. Generally avoid this method, because it does not automatically pick up new pairs as we add new supported resource types to AzCopy.

func (TestFromTo) String

func (tft TestFromTo) String() string

type TestResourceFactory

type TestResourceFactory struct{}

provide convenient methods to get access to test resources such as accounts, containers/shares, directories

func (TestResourceFactory) CreateLocalDirectory

func (TestResourceFactory) CreateLocalDirectory(c asserter) (dstDirName string)

func (TestResourceFactory) CreateNewContainer

func (TestResourceFactory) CreateNewContainer(c asserter, publicAccess *container.PublicAccessType, accountType AccountType) (cc *container.Client, name string, rawURL string)

func (TestResourceFactory) CreateNewFileShare

func (TestResourceFactory) CreateNewFileShare(c asserter, accountType AccountType) (fileShare *share.Client, name string, rawSasURL string)

func (TestResourceFactory) CreateNewFileShareSnapshot

func (TestResourceFactory) CreateNewFileShareSnapshot(c asserter, fileShare *share.Client) (snapshotID string)

func (TestResourceFactory) GetBlobServiceURL

func (TestResourceFactory) GetBlobServiceURL(accountType AccountType) *blobservice.Client

func (TestResourceFactory) GetBlobServiceURLWithSAS

func (TestResourceFactory) GetBlobServiceURLWithSAS(c asserter, accountType AccountType) *blobservice.Client

func (TestResourceFactory) GetBlobURLWithSAS

func (TestResourceFactory) GetBlobURLWithSAS(c asserter, accountType AccountType, containerName string, blobName string) *blob.Client

func (TestResourceFactory) GetContainerURLWithSAS

func (TestResourceFactory) GetContainerURLWithSAS(c asserter, accountType AccountType, containerName string) *container.Client

func (TestResourceFactory) GetDatalakeServiceURL

func (TestResourceFactory) GetDatalakeServiceURL(accountType AccountType) *datalakeservice.Client

func (TestResourceFactory) GetFileServiceURL

func (TestResourceFactory) GetFileServiceURL(accountType AccountType) *fileservice.Client

func (TestResourceFactory) GetFileShareURLWithSAS added in v10.21.0

func (TestResourceFactory) GetFileShareURLWithSAS(c asserter, accountType AccountType, containerName string) *share.Client

type TestResourceNameGenerator

type TestResourceNameGenerator struct{}

func (TestResourceNameGenerator) GenerateContainerName

func (TestResourceNameGenerator) GenerateContainerName(c asserter) string

type TestRunner

type TestRunner struct {
	// contains filtered or unexported fields
}

encapsulates the interaction with the AzCopy instance that is being tested the flag names should be captured here so that in case they change, only 1 place needs to be updated

func (*TestRunner) ExecuteAzCopyCommand

func (t *TestRunner) ExecuteAzCopyCommand(operation Operation, src, dst string, needsOAuth bool, oauthMode string, needsFromTo bool, fromTo common.FromTo, afterStart func() string, chToStdin <-chan string, logDir string) (CopyOrSyncCommandResult, bool, error)

func (*TestRunner) ExecuteJobsShowCommand

func (t *TestRunner) ExecuteJobsShowCommand(jobID common.JobID, azcopyDir string) (JobsShowCommandResult, error)

func (*TestRunner) SetAllFlags

func (t *TestRunner) SetAllFlags(s *scenario)

func (*TestRunner) SetAwaitOpenFlag

func (t *TestRunner) SetAwaitOpenFlag()

func (*TestRunner) SetTransferStatusFlag

func (t *TestRunner) SetTransferStatusFlag(value string)

type TieredError added in v10.24.0

type TieredError interface {
	error
	Tier() ErrorTier
}

type TieredErrorWrapper added in v10.24.0

type TieredErrorWrapper struct {
	ErrorTier
	// contains filtered or unexported fields
}

func (TieredErrorWrapper) Tier added in v10.24.0

func (w TieredErrorWrapper) Tier() ErrorTier

type TraversalOperation added in v10.24.0

type TraversalOperation uint8
const (
	// TraversalOperationContinue continue traversing children
	TraversalOperationContinue TraversalOperation = iota
	// TraversalOperationStop stop traversing children
	TraversalOperationStop
	// TraversalOperationRemove remove this node from the tree and all children
	TraversalOperationRemove
)

type TrieNode added in v10.24.0

type TrieNode[T any] struct {
	Parent   *TrieNode[T]
	Children map[string]*TrieNode[T]
	Segment  string

	Data *T
}

func (*TrieNode[T]) Traverse added in v10.24.0

func (n *TrieNode[T]) Traverse(traversalFunc func(data *T) TraversalOperation)

type Validate

type Validate uint8

func (Validate) Auto

func (Validate) Auto() Validate

Auto automatically validates everything except for the actual content of the transferred files. It includes "which transfers did we attempt, and what was their outcome?" AND, if any of the shouldTransfer files specify file properties that should be validated, it validates those too

func (Validate) AutoPlusContent

func (Validate) AutoPlusContent() Validate

BasicPlusContent also validates the file content

func (Validate) String

func (v Validate) String() string

type Validator

type Validator struct{}

func (Validator) ValidateCopyTransfersAreScheduled

func (Validator) ValidateCopyTransfersAreScheduled(s *scenario, isSrcEncoded bool, isDstEncoded bool,
	sourcePrefix string, destinationPrefix string, expectedTransfers []*testObject, actualTransfers []common.TransferDetail, statusToTest common.TransferStatus, expectFolders bool)

func (Validator) ValidateRemoveTransfer

func (Validator) ValidateRemoveTransfer(c asserter, isSrcEncoded bool, isDstEncoded bool,
	sourcePrefix string, destinationPrefix string, expectedTransfers []*testObject, actualTransfers []common.TransferDetail, statusToTest common.TransferStatus)

type VariationDataContainer added in v10.24.0

type VariationDataContainer struct {
	Previous *VariationDataContainer

	Value any
	// contains filtered or unexported fields
}

VariationDataContainer acts like a reverse linked list, sort of like a Context. It, too implements VariationData, if for some reason that's necessary

func (*VariationDataContainer) GetTestName added in v10.24.0

func (vdc *VariationDataContainer) GetTestName() string

func (*VariationDataContainer) Insert added in v10.24.0

func (vdc *VariationDataContainer) Insert(callerID string, value any) *VariationDataContainer

func (*VariationDataContainer) Lookup added in v10.24.0

func (vdc *VariationDataContainer) Lookup(callerID string) (any, bool)

type WindowsAttribute added in v10.24.0

type WindowsAttribute uint32
const (
	WindowsAttributeReadOnly WindowsAttribute = 1 << iota
	WindowsAttributeHidden
	WindowsAttributeSystemFile

	WindowsAttributeArchiveReady

	WindowsAttributeNormalFile
	WindowsAttributeTemporaryFile

	WindowsAttributeCompressedFile
	WindowsAttributeOfflineFile
	WindowsAttributeNonIndexedFile
	WindowsAttributeEncryptedFile
)

func ParseNTFSAttributes added in v10.24.0

func ParseNTFSAttributes(attr string) (WindowsAttribute, error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL