mockregistry

package
v0.1.4 Latest Latest
Warning

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

Go to latest
Published: Nov 6, 2024 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Overview

Package mockregistry provides a mock implementation of the registry.Registry interface.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type MockKey

type MockKey struct {
	KName      string
	KClassName string
	KSubkeys   []registry.Key
	KValues    []registry.Value
}

MockKey mocks a registry.Key.

func (*MockKey) ClassName

func (o *MockKey) ClassName() ([]byte, error)

ClassName returns the class name of the key.

func (*MockKey) Name

func (o *MockKey) Name() string

Name returns the name of the key.

func (*MockKey) Subkeys

func (o *MockKey) Subkeys() []registry.Key

Subkeys returns the subkeys of the key.

func (*MockKey) Values

func (o *MockKey) Values() []registry.Value

Values returns the different values contained in the key.

type MockRegistry

type MockRegistry struct {
	Keys map[string]registry.Key
}

MockRegistry mocks registry access.

func (*MockRegistry) Close

func (o *MockRegistry) Close() error

Close does nothing when mocking.

func (*MockRegistry) OpenKey

func (o *MockRegistry) OpenKey(path string) registry.Key

OpenKey open the requested registry key.

type MockValue

type MockValue struct {
	VName string
	VData []byte
}

MockValue mocks a registry.Value.

func (*MockValue) Data

func (o *MockValue) Data() []byte

Data returns the data contained in the value.

func (*MockValue) Name

func (o *MockValue) Name() string

Name returns the name of the value.

Jump to

Keyboard shortcuts

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