Documentation ¶
Index ¶
- Constants
- func ValueToBytes(value Value) ([]byte, error)
- type Cmd
- type Command
- type Type
- type Value
- func BytesToValue(data []byte) (Value, error)
- func NewBool(value bool) Value
- func NewBuffer(size int) Value
- func NewByteArray(value []byte) Value
- func NewFloat(value float64) Value
- func NewInt(value int64) Value
- func NewList(values []any) Value
- func NewMap(values map[string]any) Value
- func NewString(value string) Value
Constants ¶
View Source
const ( TypeBool = uint8(iota) TypeInt TypeFloat TypeBytes TypeString TypeList TypeMap TypeSet TypeSortedSet TypeBuffer TypeEnd )
Variables ¶
This section is empty.
Functions ¶
func ValueToBytes ¶
Types ¶
type Value ¶
type Value struct { Type Type Size int Value []byte Values []Value ValueMap map[string]Value ValueSet map[string]Value ValueBuffer *queue.RingBuffer }
Value represents a Nyandis value. It can be a boolean, integer, float, byte array, string, list, map, set, or buffer.
func BytesToValue ¶
func NewByteArray ¶
Click to show internal directories.
Click to hide internal directories.