ssob

package module
v1.0.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 26, 2020 License: GPL-2.0 Imports: 7 Imported by: 0

README

ssob

Stupid simple object binary gob like serializer intended to be easy to port and fast

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MarshalBool

func MarshalBool(in bool) (ret []byte)

func MarshalFloat32

func MarshalFloat32(in float32) (ret []byte)

func MarshalFloat64

func MarshalFloat64(in float64) (ret []byte)

func MarshalInt16

func MarshalInt16(in int16) (ret []byte)

func MarshalInt32

func MarshalInt32(in int32) (ret []byte)

func MarshalInt64

func MarshalInt64(in int64) (ret []byte)

func MarshalInt8

func MarshalInt8(in int8) (ret []byte)

func MarshalString

func MarshalString(in string) (ret []byte)

func MarshalUint16

func MarshalUint16(in uint16) (ret []byte)

func MarshalUint32

func MarshalUint32(in uint32) (ret []byte)

func MarshalUint64

func MarshalUint64(in uint64) (ret []byte)

func MarshalUint8

func MarshalUint8(in uint8) (ret []byte)

func RegisterDecoder

func RegisterDecoder(name string, f func(e interface{}, in []byte) (n int, err error))

func RegisterEncoder

func RegisterEncoder(name string, f MarshalFunc)

func RegisterUnsafeDecoder

func RegisterUnsafeDecoder(name string, f func(e interface{}, in []byte) (n int, err error))

func RegisterUnsafeEncoder

func RegisterUnsafeEncoder(name string, f MarshalFunc)

func UnmarshalBool

func UnmarshalBool(in []byte) (ret bool, n int, err error)

func UnmarshalFloat32

func UnmarshalFloat32(in []byte) (ret float32, n int, err error)

func UnmarshalFloat64

func UnmarshalFloat64(in []byte) (ret float64, n int, err error)

func UnmarshalInt16

func UnmarshalInt16(in []byte) (ret int16, n int, err error)

func UnmarshalInt32

func UnmarshalInt32(in []byte) (ret int32, n int, err error)

func UnmarshalInt64

func UnmarshalInt64(in []byte) (ret int64, n int, err error)

func UnmarshalInt8

func UnmarshalInt8(in []byte) (ret int8, n int, err error)

func UnmarshalString

func UnmarshalString(in []byte) (ret string, n int, err error)

func UnmarshalUint16

func UnmarshalUint16(in []byte) (ret uint16, n int, err error)

func UnmarshalUint32

func UnmarshalUint32(in []byte) (ret uint32, n int, err error)

func UnmarshalUint64

func UnmarshalUint64(in []byte) (ret uint64, n int, err error)

func UnmarshalUint8

func UnmarshalUint8(in []byte) (ret uint8, n int, err error)

func UnsafeMarshalBool

func UnsafeMarshalBool(in bool) (ret []byte)

func UnsafeMarshalFloat32

func UnsafeMarshalFloat32(in float32) (ret []byte)

func UnsafeMarshalFloat64

func UnsafeMarshalFloat64(in float64) (ret []byte)

func UnsafeMarshalInt16

func UnsafeMarshalInt16(in int16) (ret []byte)

func UnsafeMarshalInt32

func UnsafeMarshalInt32(in int32) (ret []byte)

func UnsafeMarshalInt64

func UnsafeMarshalInt64(in int64) (ret []byte)

func UnsafeMarshalInt8

func UnsafeMarshalInt8(in int8) (ret []byte)

func UnsafeMarshalString

func UnsafeMarshalString(in string) (ret []byte)

func UnsafeMarshalUint16

func UnsafeMarshalUint16(in uint16) (ret []byte)

func UnsafeMarshalUint32

func UnsafeMarshalUint32(in uint32) (ret []byte)

func UnsafeMarshalUint64

func UnsafeMarshalUint64(in uint64) (ret []byte)

func UnsafeMarshalUint8

func UnsafeMarshalUint8(in uint8) (ret []byte)

func UnsafeUnmarshalBool

func UnsafeUnmarshalBool(in []byte) (ret bool, n int, err error)

func UnsafeUnmarshalFloat32

func UnsafeUnmarshalFloat32(in []byte) (ret float32, n int, err error)

func UnsafeUnmarshalFloat64

func UnsafeUnmarshalFloat64(in []byte) (ret float64, n int, err error)

func UnsafeUnmarshalInt16

func UnsafeUnmarshalInt16(in []byte) (ret int16, n int, err error)

func UnsafeUnmarshalInt32

func UnsafeUnmarshalInt32(in []byte) (ret int32, n int, err error)

func UnsafeUnmarshalInt64

func UnsafeUnmarshalInt64(in []byte) (ret int64, n int, err error)

func UnsafeUnmarshalInt8

func UnsafeUnmarshalInt8(in []byte) (ret int8, n int, err error)

func UnsafeUnmarshalString

func UnsafeUnmarshalString(in []byte) (ret string, n int, err error)

func UnsafeUnmarshalUint16

func UnsafeUnmarshalUint16(in []byte) (ret uint16, n int, err error)

func UnsafeUnmarshalUint32

func UnsafeUnmarshalUint32(in []byte) (ret uint32, n int, err error)

func UnsafeUnmarshalUint64

func UnsafeUnmarshalUint64(in []byte) (ret uint64, n int, err error)

func UnsafeUnmarshalUint8

func UnsafeUnmarshalUint8(in []byte) (ret uint8, n int, err error)

Types

type Decoder

type Decoder struct {
	// contains filtered or unexported fields
}

func NewDecoder

func NewDecoder(r io.Reader) *Decoder

func (*Decoder) Decode

func (dec *Decoder) Decode(e interface{}) (err error)

func (*Decoder) DecodeValue

func (dec *Decoder) DecodeValue(value reflect.Value) (err error)

type Encoder

type Encoder struct {
	// contains filtered or unexported fields
}

func NewEncoder

func NewEncoder(w io.Writer) *Encoder

func (*Encoder) Encode

func (enc *Encoder) Encode(e interface{}) (err error)

func (*Encoder) EncodeValue

func (enc *Encoder) EncodeValue(value reflect.Value) (err error)

type MarshalFunc

type MarshalFunc func(e interface{}) (ret []byte, err error)

type UnsafeDecoder

type UnsafeDecoder struct {
	// contains filtered or unexported fields
}

func NewUnsafeDecoder

func NewUnsafeDecoder(r io.Reader) *UnsafeDecoder

func (*UnsafeDecoder) Decode

func (dec *UnsafeDecoder) Decode(e interface{}) (err error)

func (*UnsafeDecoder) DecodeValue

func (dec *UnsafeDecoder) DecodeValue(value reflect.Value) (err error)

type UnsafeEncoder

type UnsafeEncoder struct {
	// contains filtered or unexported fields
}

func NewUnsafeEncoder

func NewUnsafeEncoder(w io.Writer) *UnsafeEncoder

func (*UnsafeEncoder) Encode

func (enc *UnsafeEncoder) Encode(e interface{}) (err error)

func (*UnsafeEncoder) EncodeValue

func (enc *UnsafeEncoder) EncodeValue(value reflect.Value) (err error)

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL