Documentation
¶
Index ¶
- func DateEncodedSize(time time.Time) int
- func DecodeDate(src []byte) (result time.Time, bytesDecoded int, ok bool)
- func DecodeTime(src []byte) (result time.Time, bytesDecoded int, ok bool, err error)
- func DecodeTimestamp(src []byte) (result time.Time, bytesDecoded int, ok bool, err error)
- func EncodeDate(time time.Time, dst []byte) (bytesEncoded int, ok bool)
- func EncodeTime(tValue time.Time, dst []byte) (bytesEncoded int, ok bool, err error)
- func EncodeTimestamp(time time.Time, dst []byte) (bytesEncoded int, ok bool, err error)
- func TimeEncodedSize(time time.Time) int
- func TimestampEncodedSize(time time.Time) int
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func DateEncodedSize ¶
Get the number of bytes that would be required to encode this date.
func DecodeDate ¶
Decode a date. Returns the number of bytes decoded, or the number of bytes it attempted to decode. Returns ok=true if there was enough data in src. If ok == false, the resulting date is invalid.
func DecodeTime ¶
Decode a time value. Returns the number of bytes decoded, or the number of bytes it attempted to decode. Returns ok=true if there was enough data in src. Returns an error if something went wrong other than there not being enough data. If ok == false or err != nil, the resulting time value is invalid.
func DecodeTimestamp ¶
Decode a timestamp. Returns the number of bytes decoded, or the number of bytes it attempted to decode. Returns ok=true if there was enough data in src. Returns an error if something went wrong other than there not being enough data. If ok == false or err != nil, the resulting timestamp is invalid.
func EncodeDate ¶
Encode a date. Returns the number of bytes encoded, or the number of bytes it attempted to encode. Returns ok=true if there was enough room in dst.
func EncodeTime ¶
Encode a time value. Returns the number of bytes encoded, or the number of bytes it attempted to encode. Returns ok=true if there was enough room in dst. Returns an error if something went wrong other than there not being enough room.
func EncodeTimestamp ¶
Encode a timestamp. Returns the number of bytes encoded, or the number of bytes it attempted to encode. Returns ok=true if there was enough room in dst. Returns an error if something went wrong other than there not being enough room.
func TimeEncodedSize ¶
Get the number of bytes that would be required to encode this time value.
func TimestampEncodedSize ¶
Get the number of bytes that would be required to encode this timestamp.
Types ¶
This section is empty.