Documentation ¶
Index ¶
- Constants
- Variables
- func AddValue(out io.Writer, v *Value, varintbuf *[binary.MaxVarintLen64 + 1]byte)
- func BoolFromBytes(buf []byte) bool
- func BoolToBytes(b bool) []byte
- func Float32FromBytes(buf []byte) float32
- func Float32ToBytes(f *float32) []byte
- func Float64FromBytes(buf []byte) float64
- func Float64ToBytes(f float64, buf *[8]byte)
- func Int16FromBytes(buf []byte) int16
- func Int16ToBytes(f int16) []byte
- func Int32FromBytes(buf []byte) int32
- func Int32ToBytes(f int32) []byte
- func Int64FromBytes(buf []byte) int64
- func Int64ToBytes(f int64) []byte
- func Int8FromBytes(buf byte) int8
- func Int8ToBytes(u int8) byte
- func StringFromBytes(b []byte) string
- func StringToBytes(s string) []byte
- func Uint16FromBytes(buf []byte) uint16
- func Uint16ToBytes(f uint16) []byte
- func Uint32FromBytes(buf []byte) uint32
- func Uint32ToBytes(f uint32) []byte
- func Uint64FromBytes(buf []byte) uint64
- func Uint64ToBytes(f uint64) []byte
- func Uint8FromBytes(buf byte) uint8
- func Uint8ToBytes(u uint8) byte
- type KeyValue
- type Reader
- type Value
Constants ¶
const ( StringT = ttType(iota + 1) BytesT Int8T Int16T Int32T Int64T Uint8T Uint16T Uint32T Uint64T BoolT Float32T Float64T MapT ArrT )
Variables ¶
var ( //ErrInvalidInput is used for when the input it invalid ErrInvalidInput = errors.New("invalid input") )
Functions ¶
func Float32FromBytes ¶
Float32FromBytes bytes into a float32
func Float32ToBytes ¶
Float32ToBytes converts a float32 into bytes
func Float64FromBytes ¶
Float64FromBytes bytes into a float64
func Float64ToBytes ¶
Float64ToBytes converts a float64 into bytes
func Int16FromBytes ¶
Int16FromBytes converts bytes into an int16
func Int32FromBytes ¶
Int32FromBytes converts bytes into an int32
func Int64FromBytes ¶
Int64FromBytes converts bytes into an int64
func StringFromBytes ¶
StringFromBytes converts bytes to a string
func Uint16FromBytes ¶
Uint16FromBytes converts bytes into an uint16
func Uint32FromBytes ¶
Uint32FromBytes converts bytes into an uint32
func Uint64FromBytes ¶
Uint64FromBytes converts bytes into an uint64
func Uint8FromBytes ¶
Uint8FromBytes converts bytes into an uint8
Types ¶
type KeyValue ¶ added in v0.8.0
type KeyValue struct { Value []byte //the key to the data of this object in its final form Vtype ttType //the type of the data of this object in its final form }
KeyValue is the key used for storing the key/value
func (*KeyValue) ExportStructID ¶ added in v0.8.0
ExportStructID returns a string identifying the value
type Reader ¶
type Reader interface { io.Reader io.ByteReader }
Reader merges io.reader and io.ByteReader
type Value ¶
type Value struct { Key KeyValue //the key of this object in its final form Value KeyValue //the value of this object in its final form //Value []byte //the key to the data of this object in its final form //Vtype ttType //the type of the data of this object in its final form Childrenn uint64 }
Value is the type that contains the value data