vss

package
v1.18.1 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2021 License: BSD-3-Clause Imports: 7 Imported by: 0

Documentation

Rendered for windows/amd64

Overview

Package vss provides a minimal set of wrappers for the COM interfaces used for accessing Windows's Volume Shadow Copy Service.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type COMAllocatedString

type COMAllocatedString uintptr

Type representing a C pointer to a null-terminated UTF-16 string that was allocated by the COM runtime.

func (*COMAllocatedString) Close

func (s *COMAllocatedString) Close() error

func (*COMAllocatedString) String

func (s *COMAllocatedString) String() string

type ObjectProperties

type ObjectProperties struct {
	Obj SnapshotProperties
	// contains filtered or unexported fields
}

Because of the constraints that this package applies to queries, the objType field may be ignored when reading its data.

func (*ObjectProperties) Close

func (props *ObjectProperties) Close() error

type SnapshotEnumerator

type SnapshotEnumerator interface {
	io.Closer
	QuerySnapshots() (SnapshotList, error)
}

SnapshotEnumerator is the interface that enables execution of a VSS query. QuerySnapshots returns a SnapshotList of all available snapshots. The elements of the SnapshotList should be returned in reverse chronological order.

func NewSnapshotEnumerator

func NewSnapshotEnumerator() (SnapshotEnumerator, error)

NewSnapshotEnumerator instantiates the necessary OS facilities for accessing the Volume Shadow Copy service, and then returns a SnapshotEnumerator that may then be used for executing a query against the service.

type SnapshotList

type SnapshotList []ObjectProperties

func (*SnapshotList) Close

func (snapList *SnapshotList) Close() error

type SnapshotProperties

type SnapshotProperties struct {
	SnapshotId           windows.GUID
	SnapshotSetId        windows.GUID
	SnapshotsCount       int32
	SnapshotDeviceObject COMAllocatedString
	OriginalVolumeName   COMAllocatedString
	OriginatingMachine   COMAllocatedString
	ServiceMachine       COMAllocatedString
	ExposedName          COMAllocatedString
	ExposedPath          COMAllocatedString
	ProviderId           windows.GUID
	SnapshotAttributes   int32
	CreationTimestamp    VSS_TIMESTAMP
	Status               int32
}

SnapshotProperties is the Go representation of the VSS_SNAPSHOT_PROP structure from the Windows SDK

func (*SnapshotProperties) Close

func (p *SnapshotProperties) Close() error

type VSS_TIMESTAMP

type VSS_TIMESTAMP int64

func VSSTimestampFromFiletime

func VSSTimestampFromFiletime(ft windows.Filetime) VSS_TIMESTAMP

Converts a windows.Filetime to a VSS_TIMESTAMP

func (VSS_TIMESTAMP) ToFiletime

func (ts VSS_TIMESTAMP) ToFiletime() windows.Filetime

Jump to

Keyboard shortcuts

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