Documentation ¶
Overview ¶
Package winreg implements a koanf.Provider for Windows registry and returns a nested config map to provide it to koanf.
Index ¶
Constants ¶
const ( RegAuto = iota Reg32Bit Reg64Bit )
Determines which branch of the registry will be accessed: 32-bit or 64-bit.
const ( CLASSES_ROOT = registry.CLASSES_ROOT CURRENT_USER = registry.CURRENT_USER LOCAL_MACHINE = registry.LOCAL_MACHINE USERS = registry.USERS CURRENT_CONFIG = registry.CURRENT_CONFIG PERFORMANCE_DATA = registry.PERFORMANCE_DATA )
Reflection of the registry package constants so you don't have to import it explicitly.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Config ¶
type Config struct { Key registry.Key // Registry key Path string // A top path in selected key DefaultValue string // The name of the value to which the default key value will be mapped MaxDepth uint // Maximum subkey reading depth Mode int // 32/64 bit registry branch, one of RegAuto/Reg32Bit/Reg64Bit constant }
type WinReg ¶
type WinReg struct {
// contains filtered or unexported fields
}
func (*WinReg) Watch ¶
Watch() watches the registry key and triggers a callback when it changes. Due to the nature of the Windows API, you cannot flexibly choose the depth of change tracking. If MaxDepth is not set to 1 in the provider, changes will be monitored to the full depth. If the monitored top-level key is deleted, the function will stop notifications, even if a key with the same name will create again. You must call the Watch() method again.