Documentation ¶
Index ¶
- Constants
- func Decode(source interface{}, destination interface{}) (err error)
- func DecodeDate(buffer []byte) *time.Time
- func DecodeFloat(buffer []byte) float64
- func DecodeNumber(buffer []byte) int64
- func DecodeUNumber(buffer []byte) uint64
- func Encode(v interface{}, a ...interface{}) *bytes.Buffer
- func EncodeDate(t *time.Time) []byte
- func EncodeFloat(f float64) []byte
- func EncodeNumber(number int64) []byte
- func EncodeUNumber(number uint64) []byte
- func SetOption(name string, v interface{})
- type Blob
- type ErrorLLSN
- type File
Constants ¶
View Source
const ( // huge data threshold (STRING, BLOB, FILE) // if set to 0 - tail encoding is disable // if set > 0 - data exeeds this value are placed to the end of binary packet DEFAULT_THRESHOLD = 0 // max length for the types STRING/BLOB STRING_MAXBYTES = 10485760 BLOB_MAXBYTES = 4294967296 // temporary folder for decoding files DECODE_FOLDER = "/tmp/" // version of encoder VERSION = 1 )
Variables ¶
This section is empty.
Functions ¶
func DecodeDate ¶
2B: year. (-32767..32768)
:4b month (1..12) :5b day of month (1..31) :5b hour (0..23) :6b min (0..59) :6b sec (0..59) :10 msec (0..999) :6b hours offset (signed) :6b min offset (unsigned) -- :48bit
-- 8B total
func DecodeFloat ¶
func DecodeNumber ¶
func DecodeUNumber ¶
func Encode ¶
Encode method allows calling
Encode(value) Encode(value, threshold)
return nil in this case. all encoded data writes to the channel Encode(value, channel) Encode(value, channel, threshold)
func EncodeDate ¶
func EncodeFloat ¶
func EncodeNumber ¶
func EncodeUNumber ¶
Types ¶
type Blob ¶
type Blob []byte
we have declared custom type Blob because of 'reflect' reflects '[]byte' as a '[]uint8' but we need the strict naming
Click to show internal directories.
Click to hide internal directories.