Documentation ¶
Index ¶
- func Interceptor(sourceFunc func() (KeyValue, error)) (string, error)
- type KeyValue
- func (kv *KeyValue) FindKey(key string) (value any, found bool)
- func (kv *KeyValue) FindValue(target any) (key any, found bool)
- func (kv *KeyValue) FromBytes(data *[]byte, lineEnding, columnDelimiter string)
- func (kv *KeyValue) FromCommandShell(columnDelimiter, lineDelimiter, command string, args ...string) (err error)
- func (kv *KeyValue) FromString(data *string, lineEnding, columnDelimiter string)
- func (kv *KeyValue) GetBool(key string) (value bool, err error)
- func (kv *KeyValue) GetFloat(key string) (value float64, err error)
- func (kv *KeyValue) GetFloat32(key string) (value float32, err error)
- func (kv *KeyValue) GetFloat64(key string) (value float64, err error)
- func (kv *KeyValue) GetInt(key string) (value int, err error)
- func (kv *KeyValue) GetString(key string) (value string, err error)
- func (kv *KeyValue) Initialize(sz int, allowOverwrite OverwriteProtection)
- func (kv *KeyValue) KeyWidth() (width int)
- func (kv *KeyValue) MergeFromKv(source KeyValue)
- func (kv *KeyValue) RenameKey(currKey, newKey string) bool
- func (kv *KeyValue) SetBool(key string, value bool)
- func (kv *KeyValue) SetFloat(key string, value float64)
- func (kv *KeyValue) SetFloat32(key string, value float32)
- func (kv *KeyValue) SetFloat64(key string, value float64)
- func (kv *KeyValue) SetInt(key string, value int)
- func (kv *KeyValue) SetString(key string, value string)
- func (kv *KeyValue) ToString(columnDelimiter string, lineEnding string) (output string)
- func (kv *KeyValue) ToStringArray(columnDelimiter string, pretty bool) (output []string)
- func (kv *KeyValue) ValueWidth() (width int)
- type Map
- type OverwriteProtection
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
Types ¶
type KeyValue ¶
type KeyValue struct {
// contains filtered or unexported fields
}
func (*KeyValue) FindKey ¶
FindKey -Return boolean result and value for a given key in the key-value set
func (*KeyValue) FindValue ¶
FindValue - Return the key where a given value exists in the key-value store and boolean true if found.
func (*KeyValue) FromBytes ¶
FromBytes - Given a reference to a byte-array, parse by lines and key-value columns, storing internally.
func (*KeyValue) FromCommandShell ¶
func (kv *KeyValue) FromCommandShell(columnDelimiter, lineDelimiter, command string, args ...string) (err error)
FromCommandShell - Execute a command shell and parse its results into the Key-Value Map.
func (*KeyValue) FromString ¶
FromString - Given a reference to a string, parse by lines and key-value columns, storing internally.
func (*KeyValue) GetBool ¶
GetBool - Return the value corresponding to a given key as boolean (if appropriate) or typecheck error
func (*KeyValue) GetFloat ¶
GetFloat - Return the value corresponding to a given key as float or typecheck error
func (*KeyValue) GetFloat32 ¶
GetFloat32 - Return the value corresponding to a given key as float or typecheck error
func (*KeyValue) GetFloat64 ¶
GetFloat64 - Return the value corresponding to a given key as float64 or typecheck error
func (*KeyValue) GetInt ¶
GetInt - Return the value corresponding to a given key as int or typecheck error
func (*KeyValue) Initialize ¶
func (kv *KeyValue) Initialize(sz int, allowOverwrite OverwriteProtection)
Initialize - Allocate memory for our Key-value map
func (*KeyValue) KeyWidth ¶
KeyWidth - Return the maximum width of all keys in the current KeyValue struct
func (*KeyValue) MergeFromKv ¶
MergeFromKv - Merge a given source KeyValue into the current struct
func (*KeyValue) RenameKey ¶
RenameKey - Return the maximum width of all values in the current KeyValue struct
func (*KeyValue) SetBool ¶
SetBool - For a given key and value, store the same in our key-value store
func (*KeyValue) SetFloat ¶
SetFloat - For a given key and value, store the same in our key-value store
func (*KeyValue) SetFloat32 ¶
SetFloat32 - For a given key and value, store the same in our key-value store
func (*KeyValue) SetFloat64 ¶
SetFloat64 - For a given key and value, store the same in our key-value store
func (*KeyValue) SetString ¶
SetString - For a given key and value, store the same in our key-value store
func (*KeyValue) ToStringArray ¶
ToStringArray - Return a list of strings where each row represents a key-value line
func (*KeyValue) ValueWidth ¶
ValueWidth - Return the maximum width of all values in the current KeyValue struct
type OverwriteProtection ¶
type OverwriteProtection bool
Source Files ¶
- FindKey.go
- FindValue.go
- FromBytes.go
- FromCommandShell.go
- FromString.go
- GetBool.go
- GetFloat.go
- GetFloat32.go
- GetFloat64.go
- GetInt.go
- GetString.go
- Initialize.go
- Interceptor.go
- KeyValue.go
- KeyWidth.go
- MergeFromKv.go
- RenameKey.go
- SetBool.go
- SetFloat.go
- SetFloat32.go
- SetFloat64.go
- SetInt.go
- SetString.go
- ToString.go
- ToStringArray.go
- ValueWidth.go
- constants.go