Documentation ¶
Index ¶
- func Version() string
- type Error
- type File
- type Key
- func (key *Key) ClassName() (string, error)
- func (key *Key) ClassNameLen() (int, error)
- func (key *Key) Free() error
- func (key *Key) Name() (string, error)
- func (key *Key) NameLen() (int, error)
- func (key *Key) SubkeyAt(index int) (*Key, error)
- func (key *Key) SubkeyByName(name string) (*Key, error)
- func (key *Key) SubkeysLen() (int, error)
- func (key *Key) Value(path string) (*Value, error)
- func (key *Key) ValueAt(index int) (*Value, error)
- func (key *Key) ValuesLen() (int, error)
- type MultiString
- type Value
- func (value *Value) Free() error
- func (value *Value) Name() (string, error)
- func (value *Value) NameLen() (int, error)
- func (value *Value) String() (string, error)
- func (value *Value) TBinary() ([]byte, error)
- func (value *Value) TBinaryLen() (int, error)
- func (value *Value) TMultiString() (*MultiString, error)
- func (value *Value) TString() (string, error)
- func (value *Value) TStringLen() (int, error)
- func (value *Value) Tint32() (int, error)
- func (value *Value) Tint64() (int, error)
- func (value *Value) Type() (int, error)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type Error ¶
type Error C.libregf_error_t
Error is an opaque struct to group related method calls
type File ¶
type File C.libregf_file_t
File is an opaque struct to group related method calls
func OpenFile ¶
OpenFile opens a registry file by its path. It wraps libregf_file_initialize() and libregf_file_open().
func (*File) Close ¶
func (file *File) Close()
Close closes a registry file. It wraps libregf_file_close().
func (*File) Key ¶
Key returns a Key by its path inside the registry. It wraps libregf_file_get_key_by_utf8_path().
func (*File) RootKey ¶
RootKey returns the root Key of a registry file. It wraps libregf_file_get_root_key().
type Key ¶
type Key C.libregf_key_t
Key is an opaque struct to group related method calls
func (*Key) ClassName ¶
ClassName returns the Key's class name. It wraps libregf_key_get_utf8_class_name(). It returns a regular Go string, so you don't have to worry about the underlying C calls and memory allocations.
func (*Key) ClassNameLen ¶
ClassNameLen returns the length (in bytes) of the Key's class name. It wraps libregf_key_get_utf8_class_name_size(). You usually call it to know how much space to allocate before calling libregf_key_get_utf8_class_name(). You don't need to call this function if you call ClassName(), which calls ClassNameLen().
func (*Key) Free ¶
Free frees memory allocated in C for the hidden Key struct. It wraps libregf_key_free().
func (*Key) Name ¶
Name returns the Key's name. It wraps libregf_key_get_utf8_name(). It returns a regular Go string, so you don't have to worry about the underlying C calls and memory allocations.
func (*Key) NameLen ¶
NameLen returns the length (in bytes) of the Key's name. It wraps libregf_key_get_utf8_name_size(). You usually call it to know how much space to allocate before calling libregf_key_get_utf8_name(). You don't need to call this function if you call Name(), which calls NameLen().
func (*Key) SubkeyAt ¶
SubkeyAt returns the Key at a given position inside another Key. It wraps libregf_key_get_sub_key().
func (*Key) SubkeyByName ¶
SubkeyByName returns the Key present inside another Key by its name. It wraps libregf_key_get_sub_key_by_utf8_name().
func (*Key) SubkeysLen ¶
SubkeysLen returns the count of sub-Keys present inside a Key. It wraps libregf_key_get_number_of_sub_keys().
func (*Key) Value ¶
Value returns the Value present inside a Key by its name. It wraps libregf_key_get_value_by_utf8_name().
type MultiString ¶
type MultiString C.libregf_multi_string_t
MultiString is an opaque struct to group related method calls
func (*MultiString) Free ¶
func (ms *MultiString) Free() error
Free frees the memory allocated by C to an opaque *MultiString. It wraps libregf_multi_string_free(). Most of the time you will just defer a call to Free() right after calling a function that allocates a MultiString.
func (*MultiString) StringAt ¶
func (ms *MultiString) StringAt(index int) (string, error)
StringAt returns the string at a position inside a MultiString. It wraps libregf_multi_string_get_utf8_string().
func (*MultiString) StringLenAt ¶
func (ms *MultiString) StringLenAt(index int) (int, error)
StringLenAt returns the length (in bytes) of a particular string in a MultiString. It wraps libregf_multi_string_get_utf8_string_size(). You don't need to call this function if you call StringAt(), which calls StringLenAt().
func (*MultiString) Strings ¶
func (ms *MultiString) Strings() ([]string, error)
Strings returns all of the strings inside a MultiString as a []string.
func (*MultiString) StringsLen ¶
func (ms *MultiString) StringsLen() (int, error)
StringsLen returns the number of strings contained in a MultiString. It wraps libregf_multi_string_get_number_of_strings().
type Value ¶
type Value C.libregf_value_t
Value is an opaque struct to group related method calls
func (*Value) Free ¶
Free frees memory allocated in C for the hidden Value struct. It wraps libregf_value_free().
func (*Value) Name ¶
Name returns the Value's name. It wraps libregf_value_get_utf8_name(). It returns a regular Go string, so you don't have to worry about the underlying C calls and memory allocations.
func (*Value) NameLen ¶
NameLen returns the length (in bytes) of the Value's name. It wraps libregf_value_get_utf8_name_size(). You usually call it to know how much space to allocate before calling libregf_value_get_utf8_name(). You don't need to call this function if you call Name(), which calls NameLen().
func (*Value) String ¶
String returns any possible value as a string. These results may be truncated depending on the type and size of the underlying value.
func (*Value) TBinary ¶
TBinary returns a value of type LIBREGF_VALUE_TYPE_BINARY_DATANG as a Go []byte It wraps libregf_value_get_value_binary_data().
func (*Value) TBinaryLen ¶
TBinaryLen returns the length (in bytes) of a value of type LIBREGF_VALUE_TYPE_BINARY_DATA It wraps libregf_value_get_value_binary_data_size(). You don't need to call this function if you call TBinary(), which calls TBinaryLen().
func (*Value) TMultiString ¶
func (value *Value) TMultiString() (*MultiString, error)
TMultiString returns a value of type LIBREGF_VALUE_TYPE_MULTI_VALUE_STRING as a pointer to a MultiString struct. You can only access the inner strings through the (*MultiString) methods. It wraps libregf_value_get_value_multi_string().
func (*Value) TString ¶
TString returns a value of type LIBREGF_VALUE_TYPE_STRING as a Go string It wraps libregf_value_get_value_utf8_string().
func (*Value) TStringLen ¶
TStringLen returns the length (in bytes) of a value of type LIBREGF_VALUE_TYPE_STRING It wraps libregf_value_get_value_utf8_string_size(). You don't need to call this function if you call TString(), which calls TStringLen().
func (*Value) Tint32 ¶
Tint32 returns a value of type LIBREGF_VALUE_TYPE_INTEGER_32BIT_LITTLE_ENDIAN as a Go int It wraps libregf_value_get_value_32bit().