registry

package
Version: v1.2.0 Latest Latest
Warning

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

Go to latest
Published: Jul 14, 2015 License: Apache-2.0 Imports: 0 Imported by: 1

Documentation

Overview

Package registry provides primitives to access the Windows Registry

Index

Constants

View Source
const (
	HKEY_CLASSES_ROOT = iota
	HKEY_CURRENT_USER
	HKEY_LOCAL_MACHINE
	HKEY_USERS
	HKEY_PERFORMANCE_DATA
	HKEY_CURRENT_CONFIG
	HKEY_DYN_DATA
)

Registry hKey index values, do not reorder

Variables

This section is empty.

Functions

This section is empty.

Types

type MockRegistry

type MockRegistry struct {
	Timers map[string]uint64
}

func NewMockRegistry

func NewMockRegistry() MockRegistry

func (MockRegistry) CreateKey

func (r MockRegistry) CreateKey(path RegPath) error

func (MockRegistry) DeleteKey

func (r MockRegistry) DeleteKey(path RegPath) error

func (MockRegistry) DeleteValue

func (r MockRegistry) DeleteValue(path RegPath, valueName string) error

func (MockRegistry) EnumValues

func (r MockRegistry) EnumValues(path RegPath) []string

func (MockRegistry) GetQword

func (r MockRegistry) GetQword(path RegPath, valueName string) (uint64, error)

func (MockRegistry) SetQword

func (r MockRegistry) SetQword(path RegPath, valueName string, value uint64) error

type RegPath

type RegPath struct {
	HKeyIdx  uint8
	LpSubKey string
}

A registry path is composed of an hKey index and the string representation of the path withing that hKey. We use hKey indexes to avoid dependency on non-portable syscall values.

type Registry

type Registry interface {
	SetQword(path RegPath, valueName string, value uint64) error
	GetQword(path RegPath, valueName string) (uint64, error)
	DeleteValue(path RegPath, valueName string) error
	CreateKey(path RegPath) error
	DeleteKey(path RegPath) error
	EnumValues(ath RegPath) []string
}

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
t or T : Toggle theme light dark auto
y or Y : Canonical URL