Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var ( // ErrInvalidTarget is returned when the target is not a pointer. ErrInvalidTarget = errors.New("must pass a pointer to decode a value to") // ErrUnknownType is returned when the type is unknown. ErrUnknownType = errors.New("unknown type") // ErrByteSliceSize is returned when the byte slice provided doesn't have // enough capacity to hold the encoded value. ErrByteSliceSize = errors.New("receiving byte array doesn't have enough capacity") // ErrNullByte is returned when a string to be encoded contains a null byte. ErrNullByte = errors.New("can't encode strings that contain a null byte") // ErrInvalidTime is returned when an encoded time can't be marshaled to time.Time. ErrInvalidTime = errors.New("can't marshal to time.Time") )
Functions ¶
func DecodeValue ¶
DecodeValue decodes the first value in slice b into the location defined by pointer v.
func EncodeValue ¶
EncodeValue encodes value v to the beginning of byte slice b, optionally in inverse order, and returns the number of bytes written.
func EncodedSize ¶
EncodedSize returns the number of bytes required to encode the value v.
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.