Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func GetCacheDirectory ¶ added in v1.10.0
GetCacheDirectory returns the cache directory for a library item based on its name, version, and intended storage profile.
func GetCachedFileName ¶ added in v1.10.0
GetCachedFileName returns the first 17 characters of a SHA-1 sum of a file name and extension, ex. my-disk.vmdk or my-firmware.nvram.
Types ¶
type CacheStorageURIsClient ¶
type CacheStorageURIsClient interface {
DatastoreFileExists(
ctx context.Context,
name string,
datacenter *object.Datacenter) error
CopyVirtualDisk(
ctx context.Context,
srcName string, srcDatacenter *object.Datacenter,
dstName string, dstDatacenter *object.Datacenter,
dstSpec vimtypes.BaseVirtualDiskSpec, force bool) (*object.Task, error)
CopyDatastoreFile(
ctx context.Context,
srcName string, srcDatacenter *object.Datacenter,
dstName string, dstDatacenter *object.Datacenter,
force bool) (*object.Task, error)
MakeDirectory(
ctx context.Context,
name string,
datacenter *object.Datacenter,
createParentDirectories bool) error
WaitForTask(ctx context.Context, task *object.Task) error
}
CacheStorageURIsClient implements the client methods used by the CacheStorageURIs method.
type CachedFile ¶ added in v1.10.0
CachedFile refers to file that has been cached.
func CacheStorageURIs ¶
func CacheStorageURIs( ctx context.Context, client CacheStorageURIsClient, dstDatacenter, srcDatacenter *object.Datacenter, srcFiles ...SourceFile) ([]CachedFile, error)
CacheStorageURIs copies the file(s) from srcFiles to dstDir and returns the information about the copied file(s).
type SourceFile ¶ added in v1.10.0
type SourceFile struct {
Path string
VDiskID string
DstDir string
DstProfileID string
DstDiskFormat vimtypes.DatastoreSectorFormat
IsDstProfileEncrypted bool
}
SourceFile refers to a file that is to be copied, including information about what the destination file.
Click to show internal directories.
Click to hide internal directories.