Documentation ¶
Overview ¶
Package registry provides an interface to abstract the Windows registry libraries away. This allows providing more functionalities to registry libraries and also provide a better means of testing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Key ¶
type Key interface { // Name returns the name of the key. Name() string // Close closes the key. Close() error // ClassName returns the name of the class for the key. ClassName() ([]byte, error) // Subkeys returns the opened subkeys of the key. Subkeys() ([]Key, error) // SubkeyNames returns the names of the subkeys of the key. SubkeyNames() ([]string, error) // Values returns the different values of the key. Values() ([]Value, error) }
Key represents a specific registry key.
type OfflineKey ¶
type OfflineKey struct {
// contains filtered or unexported fields
}
OfflineKey wraps a regparser.CM_KEY_NODE to provide an implementation of the registry.Key interface.
func (*OfflineKey) ClassName ¶
func (o *OfflineKey) ClassName() ([]byte, error)
ClassName returns the class name of the key.
func (*OfflineKey) Close ¶ added in v0.1.5
func (o *OfflineKey) Close() error
Close closes the key. For offline keys, this is a no-op.
func (*OfflineKey) SubkeyNames ¶ added in v0.1.5
func (o *OfflineKey) SubkeyNames() ([]string, error)
SubkeyNames returns the names of the subkeys of the key.
func (*OfflineKey) Subkeys ¶
func (o *OfflineKey) Subkeys() ([]Key, error)
Subkeys returns the subkeys of the key.
func (*OfflineKey) Values ¶
func (o *OfflineKey) Values() ([]Value, error)
Values returns the different values contained in the key.
type OfflineRegistry ¶
type OfflineRegistry struct {
// contains filtered or unexported fields
}
OfflineRegistry wraps the regparser library to provide offline (from file) parsing of the Windows registry.
func NewFromFile ¶
func NewFromFile(path string) (*OfflineRegistry, error)
NewFromFile creates a new offline registry abstraction from a file.
func (*OfflineRegistry) Close ¶
func (o *OfflineRegistry) Close() error
Close closes the underlying reader.
type OfflineValue ¶
type OfflineValue struct {
// contains filtered or unexported fields
}
OfflineValue wraps a regparser.CM_KEY_VALUE to provide an implementation of the registry.Value interface.
func (*OfflineValue) Data ¶
func (o *OfflineValue) Data() ([]byte, error)
Data returns the data contained in the value.
func (*OfflineValue) Name ¶
func (o *OfflineValue) Name() string
Name returns the name of the value.