Documentation
¶
Index ¶
- Constants
- Variables
- func DecodeZigZag[T constraints.Unsigned](t T) T
- func EncodeZigZag[T constraints.Signed](t T) T
- func MarshalBool(n int, b []byte, v bool) int
- func MarshalByte(n int, b []byte, byt byte) int
- func MarshalByteSlice(n int, b []byte, bs []byte) int
- func MarshalFloat32(n int, b []byte, v float32) int
- func MarshalFloat64(n int, b []byte, v float64) int
- func MarshalInt(n int, b []byte, v int) int
- func MarshalInt16(n int, b []byte, v int16) int
- func MarshalInt32(n int, b []byte, v int32) int
- func MarshalInt64(n int, b []byte, v int64) int
- func MarshalMap[K comparable, V any](n int, b []byte, m map[K]V, kMarshal MarshalFunc[K], vMarshal MarshalFunc[V]) int
- func MarshalSlice[T any](n int, b []byte, slice []T, marshal MarshalFunc[T]) int
- func MarshalString(n int, b []byte, str string) int
- func MarshalTime(n int, b []byte, t time.Time) int
- func MarshalUInt(n int, b []byte, v uint) int
- func MarshalUInt16(n int, b []byte, v uint16) int
- func MarshalUInt32(n int, b []byte, v uint32) int
- func MarshalUInt64(n int, b []byte, v uint64) int
- func SizeBool() int
- func SizeByte() int
- func SizeByteSlice(bs []byte) int
- func SizeFloat32() int
- func SizeFloat64() int
- func SizeInt() int
- func SizeInt16() int
- func SizeInt32() int
- func SizeInt64() int
- func SizeMap[K comparable, V any](m map[K]V, kSizer interface{}, vSizer interface{}) int
- func SizeSlice[T any](slice []T, sizer interface{}) int
- func SizeString(s string) int
- func SizeTime() int
- func SizeUInt() int
- func SizeUInt16() int
- func SizeUInt32() int
- func SizeUInt64() int
- func SkipBool(n int, b []byte) (int, error)
- func SkipByte(n int, b []byte) (int, error)
- func SkipByteSlice(n int, b []byte) (int, error)
- func SkipFloat32(n int, b []byte) (int, error)
- func SkipFloat64(n int, b []byte) (int, error)
- func SkipInt(n int, b []byte) (int, error)
- func SkipInt16(n int, b []byte) (int, error)
- func SkipInt32(n int, b []byte) (int, error)
- func SkipInt64(n int, b []byte) (int, error)
- func SkipMap(n int, b []byte, kSkipper SkipFunc, vSkipper SkipFunc) (int, error)
- func SkipSlice(n int, b []byte, skipper SkipFunc) (int, error)
- func SkipString(n int, b []byte) (int, error)
- func SkipStringTag(n int, b []byte) (int, error)
- func SkipTime(n int, b []byte) (int, error)
- func SkipUInt(n int, b []byte) (int, error)
- func SkipUInt16(n int, b []byte) (int, error)
- func SkipUInt32(n int, b []byte) (int, error)
- func SkipUInt64(n int, b []byte) (int, error)
- func SkipUIntTag(n int, b []byte) (int, error)
- func UnmarshalBool(n int, b []byte) (int, bool, error)
- func UnmarshalByte(n int, b []byte) (int, byte, error)
- func UnmarshalByteSlice(n int, b []byte) (int, []byte, error)
- func UnmarshalFloat32(n int, b []byte) (int, float32, error)
- func UnmarshalFloat64(n int, b []byte) (int, float64, error)
- func UnmarshalInt(n int, b []byte) (int, int, error)
- func UnmarshalInt16(n int, b []byte) (int, int16, error)
- func UnmarshalInt32(n int, b []byte) (int, int32, error)
- func UnmarshalInt64(n int, b []byte) (int, int64, error)
- func UnmarshalMap[K comparable, V any](n int, b []byte, kUnmarshal UnmarshalFunc[K], vUnmarshal UnmarshalFunc[V]) (int, map[K]V, error)
- func UnmarshalSlice[T any](n int, b []byte, unmarshal UnmarshalFunc[T]) (int, []T, error)
- func UnmarshalString(n int, b []byte) (int, string, error)
- func UnmarshalTime(n int, b []byte) (int, time.Time, error)
- func UnmarshalUInt(n int, b []byte) (int, uint, error)
- func UnmarshalUInt16(n int, b []byte) (int, uint16, error)
- func UnmarshalUInt32(n int, b []byte) (int, uint32, error)
- func UnmarshalUInt64(n int, b []byte) (int, uint64, error)
- type MarshalFunc
- type SizeFunc
- type SkipFunc
- type UnmarshalFunc
Constants ¶
View Source
const ( Int byte = iota Int16 Int32 Int64 UInt UInt16 UInt32 UInt64 Float32 Float64 Bool Byte String Slice Map ByteSlice StringTag UIntTag Time EndOfMismatchedTypeErr = ". check your marshal process" StartOfMismatchedTypeErr = "expected a slice, found: " )
Variables ¶
View Source
var ErrBytesToSmall = errors.New("insufficient data, given bytes are too small")
View Source
var ErrNIsNotZero = errors.New("n has to be 0")
Functions ¶
func DecodeZigZag ¶
func DecodeZigZag[T constraints.Unsigned](t T) T
func EncodeZigZag ¶
func EncodeZigZag[T constraints.Signed](t T) T
func MarshalMap ¶
func MarshalMap[K comparable, V any](n int, b []byte, m map[K]V, kMarshal MarshalFunc[K], vMarshal MarshalFunc[V]) int
func MarshalSlice ¶
func MarshalSlice[T any](n int, b []byte, slice []T, marshal MarshalFunc[T]) int
func SizeByteSlice ¶
func SizeFloat32 ¶
func SizeFloat32() int
func SizeFloat64 ¶
func SizeFloat64() int
func SizeMap ¶
func SizeMap[K comparable, V any](m map[K]V, kSizer interface{}, vSizer interface{}) int
func SizeString ¶
func SizeUInt16 ¶
func SizeUInt16() int
func SizeUInt32 ¶
func SizeUInt32() int
func SizeUInt64 ¶
func SizeUInt64() int
func UnmarshalMap ¶
func UnmarshalMap[K comparable, V any](n int, b []byte, kUnmarshal UnmarshalFunc[K], vUnmarshal UnmarshalFunc[V]) (int, map[K]V, error)
func UnmarshalSlice ¶
Types ¶
Click to show internal directories.
Click to hide internal directories.