Documentation ¶
Index ¶
- type BinaryDecoder
- type BinaryEncoder
- type KeyValue
- func NewKeyValue(t Type, key, value string, parent KeyValue) KeyValue
- func NewKeyValueColor(key, value string, parent KeyValue) KeyValue
- func NewKeyValueEmpty() KeyValue
- func NewKeyValueFloat32(key, value string, parent KeyValue) KeyValue
- func NewKeyValueInt32(key, value string, parent KeyValue) KeyValue
- func NewKeyValueInt64(key, value string, parent KeyValue) KeyValue
- func NewKeyValueObject(key string, parent KeyValue) KeyValue
- func NewKeyValuePointer(key, value string, parent KeyValue) KeyValue
- func NewKeyValueRoot(key string) KeyValue
- func NewKeyValueString(key, value string, parent KeyValue) KeyValue
- func NewKeyValueUint64(key, value string, parent KeyValue) KeyValue
- type TextEncoder
- type Type
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type BinaryDecoder ¶
type BinaryDecoder struct {
// contains filtered or unexported fields
}
func NewBinaryDecoder ¶
func NewBinaryDecoder(r io.Reader) *BinaryDecoder
func (*BinaryDecoder) Decode ¶
func (d *BinaryDecoder) Decode(kv KeyValue) error
type BinaryEncoder ¶
type BinaryEncoder struct {
// contains filtered or unexported fields
}
func NewBinaryEncoder ¶
func NewBinaryEncoder(w io.Writer) *BinaryEncoder
func (*BinaryEncoder) Encode ¶
func (e *BinaryEncoder) Encode(kv KeyValue) error
type KeyValue ¶
type KeyValue interface { // Type returns the node's Type. Type() Type // SetType sets the node's Type and returns the receiver. SetType(Type) KeyValue // Key returns the node's Key. Key() string // SetKey sets the node's Key and returns the receiver. SetKey(key string) KeyValue // Value returns the node's Value. Value() string // SetValue sets the node's Value and returns the receiver. SetValue(value string) KeyValue // Parent returns the parent node. Parent() KeyValue // SetParent sets the node's parent node and returns the receiver. SetParent(KeyValue) KeyValue // Children returns all child nodes Children() []KeyValue // SetChildren sets the node's children and returns the receiver. SetChildren(...KeyValue) KeyValue // Child finds a child node with the given key. Child(key string) KeyValue // AddChild adds a child node and returns the receiver. AddChild(KeyValue) KeyValue // AddObject adds an Object child node and returns the receiver. AddObject(key string) KeyValue // AddString adds a String child node and returns the receiver. AddString(key, value string) KeyValue // AddInt32 adds an Int32 child node and returns the receiver. AddInt32(key, value string) KeyValue // AddInt64 adds an Int64 child node and returns the receiver. AddInt64(key, value string) KeyValue // AddUint64 adds an Uint64 child node and returns the receiver. AddUint64(key, value string) KeyValue // AddFloat32 adds a Float32 child node and returns the receiver. AddFloat32(key, value string) KeyValue // AddColor adds a Color child node and returns the receiver. AddColor(key, value string) KeyValue // AddPointer adds a Pointer child node and returns the receiver. AddPointer(key, value string) KeyValue encoding.BinaryMarshaler encoding.BinaryUnmarshaler }
KeyValue represents a recursive string key to arbitrary value container.
func NewKeyValueColor ¶
func NewKeyValueEmpty ¶
func NewKeyValueEmpty() KeyValue
func NewKeyValueFloat32 ¶
func NewKeyValueInt32 ¶
func NewKeyValueInt64 ¶
func NewKeyValueObject ¶
func NewKeyValuePointer ¶
func NewKeyValueRoot ¶
func NewKeyValueString ¶
func NewKeyValueUint64 ¶
type TextEncoder ¶
type TextEncoder struct {
// contains filtered or unexported fields
}
func NewTextEncoder ¶
func NewTextEncoder(w io.Writer) *TextEncoder
func (*TextEncoder) Encode ¶
func (e *TextEncoder) Encode(kv KeyValue) error
Click to show internal directories.
Click to hide internal directories.