Documentation ¶
Index ¶
- Constants
- Variables
- func Bytes(v Value) []byte
- type BoolValue
- type FloatValue
- type Int16Value
- type Int8Value
- type IntValue
- type ListValue
- type LongValue
- type OpaqueValue
- type RawValue
- type StringValue
- type Uint16Value
- type Uint8Value
- type UintValue
- type UlongValue
- type Value
- func Bool(b bool) Value
- func Float(f float32) Value
- func Int(i int32) Value
- func Int16(i int16) Value
- func Int8(i int8) Value
- func List(l []Value) Value
- func Long(l int64) Value
- func NewValue(r io.Reader) (Value, error)
- func Opaque(signature string, data []byte) Value
- func Raw(b []byte) Value
- func String(s string) Value
- func Uint(i uint32) Value
- func Uint16(i uint16) Value
- func Uint8(i uint8) Value
- func Ulong(l uint64) Value
- func Void() Value
- type VoidValue
Constants ¶
const (
ObjectReferenceSignature = "" /* 338-byte string literal not displayed */
)
Variables ¶
var ( // ErrListValueTooLong is returned when reading a list value. ErrListValueTooLong = errors.New("list value too long") // ErrRawValueTooLong is returned when reading a raw value. ErrRawValueTooLong = errors.New("raw value too long") )
Functions ¶
Types ¶
type BoolValue ¶
type BoolValue bool
BoolValue represents a Value of a boolean.
type Int8Value ¶
type Int8Value int8
Int8Value represents a Value of an int8.
type OpaqueValue ¶
type OpaqueValue struct {
// contains filtered or unexported fields
}
OpaqueValue represents a value using a signature and the data.
func (*OpaqueValue) Signature ¶
func (o *OpaqueValue) Signature() string
Signature returns the signature of the value.
type Uint8Value ¶
type Uint8Value uint8
Uint8Value represents a Value of an uint8.
func (Uint8Value) Signature ¶
func (i Uint8Value) Signature() string
Signature returns the signature of an unsigned char.
type Value ¶
Value represents a value whose type in unknown at compile time. The value can be an integer, a float, a boolean, a long or a string. When serialized, the signature of the true type is sent followed by the actual value.
func NewValue ¶
NewValue reads a value from a reader. The value is constructed in two times: first the signature of the value is read from the reader, then depending on the actual type, the value is read.