Documentation ¶
Index ¶
- type Dictionary
- func (d *Dictionary) Any(key string, v interface{}) error
- func (d *Dictionary) BytesliceSlice(key string, slice [][]byte)
- func (d *Dictionary) Dictionary(key string, v string)
- func (d *Dictionary) EndDictionary()
- func (d *Dictionary) Get() string
- func (d *Dictionary) GetBytes() []byte
- func (d *Dictionary) Int64(key string, v int64)
- func (d *Dictionary) Reset()
- func (d *Dictionary) StartDictionary(key string)
- func (d *Dictionary) StartDictionaryBytes(key []byte)
- func (d *Dictionary) String(key string, v string)
- func (d *Dictionary) StringBytes(key string, v []byte)
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Dictionary ¶
type Dictionary struct {
// contains filtered or unexported fields
}
Dictionary holds the encoded key value pairs
func NewDictionary ¶
func NewDictionary() *Dictionary
NewDictionary creates and returns a new initialized Dictionary.
func (*Dictionary) Any ¶
func (d *Dictionary) Any(key string, v interface{}) error
Any tries to write given type to dictionary. It returns an error if it is unabled to write the desired type to the dictionary. Any performs far worse than specific type encoding functions and should be avoided when possible.
func (*Dictionary) BytesliceSlice ¶
func (d *Dictionary) BytesliceSlice(key string, slice [][]byte)
BytesliceSlice writes a list of form byte slice slice ([][]byte) to the dictionary.
func (*Dictionary) Dictionary ¶
func (d *Dictionary) Dictionary(key string, v string)
Dictionary writes an encoded dictionary to the dictionary.
func (*Dictionary) EndDictionary ¶
func (d *Dictionary) EndDictionary()
EndDictionary finishes the embedded dictionary. StartDictionary() should be called before this.
func (*Dictionary) Get ¶
func (d *Dictionary) Get() string
Get returns the encoded dictionary as a string. The dictionary should not be used after.
func (*Dictionary) GetBytes ¶
func (d *Dictionary) GetBytes() []byte
Get returns the encoded dictionary as a byte slice. The dictionary should not be used after.
func (*Dictionary) Int64 ¶
func (d *Dictionary) Int64(key string, v int64)
Int64 writes an int64 to the dictionary.
func (*Dictionary) Reset ¶
func (d *Dictionary) Reset()
Reset resets the Dictionary's underlying byte slice.
func (*Dictionary) StartDictionary ¶
func (d *Dictionary) StartDictionary(key string)
StartDictionary begins an embedded dictionary with the given string key. EndDictionary() must be called to complete the embedded dictionary before Get() is called.
func (*Dictionary) StartDictionaryBytes ¶
func (d *Dictionary) StartDictionaryBytes(key []byte)
StartDictionary begins an embedded dictionary with the given byte slice key. EndDictionary() must be called to complete the embedded dictionary before Get() is called.
func (*Dictionary) String ¶
func (d *Dictionary) String(key string, v string)
String writes a string to the dictionary.
func (*Dictionary) StringBytes ¶
func (d *Dictionary) StringBytes(key string, v []byte)
StringBytes writes a byte slice to the dictionary.