Documentation ¶
Index ¶
- Constants
- type ClusterHandle
- type ClusterRegCommand
- type CryptographicServiceProviderType
- type HCLUSCRYPTPROVIDER
- type KeyHandle
- func (handle KeyHandle) Close()
- func (handle KeyHandle) CreateBatch() (RegBatchHandle, error)
- func (handle KeyHandle) CreateKey(keyName string, samDesired int) (key KeyHandle, created bool, err error)
- func (handle KeyHandle) DeleteValue(valueName string) error
- func (handle KeyHandle) LoadValues() (map[string]RegistryValue, error)
- func (handle KeyHandle) QueryByteValue(valueName string) (data []byte, err error)
- func (handle KeyHandle) QueryGuidValue(valueName string) (data guid.GUID, err error)
- func (handle KeyHandle) QueryValue(valueName string) (dwType uint32, data []byte, err error)
- func (handle KeyHandle) SetByteValue(value string, data []byte) error
- func (handle KeyHandle) SetGuidValue(value string, guid guid.GUID) error
- func (handle KeyHandle) SetValue(value string, dwType uint32, data []byte) error
- type OpenClusterCryptProviderFlags
- type RegBatchHandle
- type RegistryValue
- type ResourceHandle
Constants ¶
const ( PROV_RSA_FULL CryptographicServiceProviderType = 1 PROV_RSA_SIG CryptographicServiceProviderType = 2 PROV_DSS CryptographicServiceProviderType = 3 PROV_FORTEZZA CryptographicServiceProviderType = 4 PROV_MS_EXCHANGE CryptographicServiceProviderType = 5 PROV_SSL CryptographicServiceProviderType = 6 PROV_RSA_SCHANNEL CryptographicServiceProviderType = 12 PROV_DSS_DH CryptographicServiceProviderType = 13 PROV_EC_ECDSA_SIG CryptographicServiceProviderType = 14 PROV_EC_ECNRA_SIG CryptographicServiceProviderType = 15 PROV_EC_ECDSA_FULL CryptographicServiceProviderType = 16 PROV_EC_ECNRA_FULL CryptographicServiceProviderType = 17 PROV_DH_SCHANNEL CryptographicServiceProviderType = 18 PROV_SPYRUS_LYNKS CryptographicServiceProviderType = 20 PROV_RNG CryptographicServiceProviderType = 21 PROV_INTEL_SEC CryptographicServiceProviderType = 22 PROV_REPLACE_OWF CryptographicServiceProviderType = 23 PROV_RSA_AES CryptographicServiceProviderType = 24 MS_ENH_RSA_AES_PROV string = "Microsoft Enhanced RSA and AES Cryptographic Provider" CLUS_CREATE_CRYPT_CONTAINER_NOT_FOUND OpenClusterCryptProviderFlags = 1 CLUS_CREATE_CRYPT_NONE OpenClusterCryptProviderFlags = 0 )
const ( REG_CREATED_NEW_KEY uint32 = 0 ERROR_NO_MORE_ITEMS syscall.Errno = 0x103 CLUSREG_SET_VALUE ClusterRegCommand = 1 CLUSREG_CREATE_KEY ClusterRegCommand = 2 CLUSREG_DELETE_KEY ClusterRegCommand = 3 CLUSREG_DELETE_VALUE ClusterRegCommand = 4 CLUSREG_CONDITION_NOT_EXISTS ClusterRegCommand = 12 CLUSREG_CONDITION_IS_EQUAL ClusterRegCommand = 13 )
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ClusterHandle ¶
type ClusterHandle uintptr
func OpenCluster ¶
func OpenCluster() (handle ClusterHandle, err error)
func OpenRemoteCluster ¶
func OpenRemoteCluster(clusterName string) (handle ClusterHandle, err error)
func (ClusterHandle) Close ¶
func (handle ClusterHandle) Close()
func (ClusterHandle) OpenResource ¶
func (cluster ClusterHandle) OpenResource(resourceName string) (handle ResourceHandle, err error)
type ClusterRegCommand ¶ added in v0.0.3
type ClusterRegCommand uint32
type CryptographicServiceProviderType ¶
type CryptographicServiceProviderType uint32
type HCLUSCRYPTPROVIDER ¶
type HCLUSCRYPTPROVIDER uintptr
func OpenClusterCryptProvider ¶
func OpenClusterCryptProvider(Resource string, Provider string, dwType CryptographicServiceProviderType, dwFlags OpenClusterCryptProviderFlags) (handle HCLUSCRYPTPROVIDER, err error)
func (HCLUSCRYPTPROVIDER) CloseClusterCryptProvider ¶
func (handle HCLUSCRYPTPROVIDER) CloseClusterCryptProvider()
func (HCLUSCRYPTPROVIDER) ClusterDecrypt ¶
func (handle HCLUSCRYPTPROVIDER) ClusterDecrypt(data []byte) ([]byte, error)
func (HCLUSCRYPTPROVIDER) ClusterEncrypt ¶
func (handle HCLUSCRYPTPROVIDER) ClusterEncrypt(data []byte) ([]byte, error)
type KeyHandle ¶
type KeyHandle uintptr
func (KeyHandle) CreateBatch ¶ added in v0.0.3
func (handle KeyHandle) CreateBatch() (RegBatchHandle, error)
func (KeyHandle) CreateKey ¶
func (handle KeyHandle) CreateKey(keyName string, samDesired int) (key KeyHandle, created bool, err error)
CreateKey creates a subkey for samDesired use syscall.KEY_ALL_ACCESS KEY_READ KEY_WRITE KEY_SET_VALUE
func (KeyHandle) DeleteValue ¶ added in v0.0.3
DeleteValue deletes the value specified by valueName from a key
func (KeyHandle) LoadValues ¶ added in v0.0.3
func (handle KeyHandle) LoadValues() (map[string]RegistryValue, error)
LoadValues loads the values and data of a key into a map
func (KeyHandle) QueryByteValue ¶
QueryByteValue returns syscall.ERROR_FILE_NOT_FOUND if value does not exist
func (KeyHandle) QueryGuidValue ¶
QueryGuidValue returns syscall.ERROR_FILE_NOT_FOUND if value does not exist
func (KeyHandle) QueryValue ¶
QueryValue returns syscall.ERROR_FILE_NOT_FOUND if value does not exist for dwType either see "golang.org/x/sys/windows/registry".BINARY (and other values) or use syscall.REG_BINARY & other values
func (KeyHandle) SetByteValue ¶
SetByteValue sets a value on a key
func (KeyHandle) SetGuidValue ¶
SetGuidValue sets a value on a key
type OpenClusterCryptProviderFlags ¶
type OpenClusterCryptProviderFlags uint32
type RegBatchHandle ¶ added in v0.0.3
type RegBatchHandle uintptr
func (RegBatchHandle) BatchAddCommand ¶ added in v0.0.3
func (handle RegBatchHandle) BatchAddCommand(command ClusterRegCommand, value string, dwType uint32, data []byte) error
BatchAddCommand adds a command to a batch If data is non-nil dwType should be one of the standard registry value types (REG_*) defined in golang.org/x/sys/windows/types_windows.go
func (RegBatchHandle) CloseBatch ¶ added in v0.0.3
func (handle RegBatchHandle) CloseBatch(commit bool) (error, int)
CloseBatch closes the batch, either executing or discarding it based on the value of commit The second return value is the number of the failed command It should only be used if error is not nil
type RegistryValue ¶ added in v0.0.3
RegistryValue is a struct that contains the byte slice corresponding to a cluster registry value's data and the registry value type of the data The valid DwType options are (REG_*) defined in golang.org/x/sys/windows/types_windows.go
type ResourceHandle ¶
type ResourceHandle uintptr
func (ResourceHandle) Close ¶
func (handle ResourceHandle) Close()