Documentation
¶
Index ¶
- Variables
- func DecodeBool(d *Decoder) (bool, int, error)
- func DecodeByte(d *Decoder) (byte, int, error)
- func DecodeByteArray(d *Decoder, value []byte) (int, error)
- func DecodeByteSlice(d *Decoder) ([]byte, int, error)
- func DecodeByteSliceWithLimit(d *Decoder, limit uint32) ([]byte, int, error)
- func DecodeCompact16(d *Decoder) (uint16, int, error)
- func DecodeCompact32(d *Decoder) (uint32, int, error)
- func DecodeCompact64(d *Decoder) (uint64, int, error)
- func DecodeCompact8(d *Decoder) (uint8, int, error)
- func DecodeLen(d *Decoder, limit uint32) (uint32, int, error)
- func DecodeOption[V any, H DecodablePtr[V]](d *Decoder) (*V, int, error)
- func DecodeSliceOfByteSlice(d *Decoder) ([][]byte, int, error)
- func DecodeSliceOfByteSliceWithLimit(d *Decoder, limit uint32) ([][]byte, int, error)
- func DecodeString(d *Decoder) (string, int, error)
- func DecodeStringSlice(d *Decoder) ([]string, int, error)
- func DecodeStringSliceWithLimit(d *Decoder, limit uint32) ([]string, int, error)
- func DecodeStringWithLimit(d *Decoder, limit uint32) (string, int, error)
- func DecodeStruct[V any, H DecodablePtr[V]](d *Decoder) (V, int, error)
- func DecodeStructArray[V any, H DecodablePtr[V]](d *Decoder, value []V) (int, error)
- func DecodeStructSlice[V any, H DecodablePtr[V]](d *Decoder) ([]V, int, error)
- func DecodeStructSliceWithLimit[V any, H DecodablePtr[V]](d *Decoder, limit uint32) ([]V, int, error)
- func EncodeBool(e *Encoder, value bool) (int, error)
- func EncodeByte(e *Encoder, value byte) (int, error)
- func EncodeByteArray(e *Encoder, value []byte) (int, error)
- func EncodeByteSlice(e *Encoder, value []byte) (int, error)
- func EncodeByteSliceWithLimit(e *Encoder, value []byte, limit uint32) (int, error)
- func EncodeCompact16(e *Encoder, v uint16) (int, error)
- func EncodeCompact32(e *Encoder, v uint32) (int, error)
- func EncodeCompact64(e *Encoder, v uint64) (int, error)
- func EncodeCompact8(e *Encoder, v uint8) (int, error)
- func EncodeLen(e *Encoder, v uint32, limit uint32) (int, error)
- func EncodeOption[V any, H EncodablePtr[V]](e *Encoder, value *V) (int, error)
- func EncodeSliceOfByteSlice(e *Encoder, value [][]byte) (int, error)
- func EncodeSliceOfByteSliceWithLimit(e *Encoder, value [][]byte, limit uint32) (int, error)
- func EncodeString(e *Encoder, value string) (int, error)
- func EncodeStringSlice(e *Encoder, value []string) (int, error)
- func EncodeStringSliceWithLimit(e *Encoder, value []string, limit uint32) (int, error)
- func EncodeStringWithLimit(e *Encoder, value string, limit uint32) (int, error)
- func EncodeStruct[V any, H EncodablePtr[V]](e *Encoder, value V) (int, error)
- func EncodeStructArray[V any, H EncodablePtr[V]](e *Encoder, value []V) (int, error)
- func EncodeStructSlice[V any, H EncodablePtr[V]](e *Encoder, value []V) (int, error)
- func EncodeStructSliceWithLimit[V any, H EncodablePtr[V]](e *Encoder, value []V, limit uint32) (int, error)
- func EncodeUint16(e *Encoder, value uint16) (int, error)
- func EncodeUint32(e *Encoder, value uint32) (int, error)
- func EncodeUint64(e *Encoder, value uint64) (int, error)
- func Generate(pkg string, filepath string, objs ...interface{}) error
- type Decodable
- type DecodablePtr
- type Decoder
- type Encodable
- type EncodablePtr
- type Encoder
- type Type
- type TypePtr
- type U8
Constants ¶
This section is empty.
Variables ¶
View Source
var ErrDecodeTooManyElements = errors.New("too many elements to decode in collection with scale limit set")
ErrDecodeTooManyElements is returned when scale limit tag is used and collection has too many elements to decode.
View Source
var ErrEncodeTooManyElements = errors.New("too many elements to encode in collection with scale limit set")
ErrEncodeTooManyElements is returned when scale limit tag is used and collection has too many elements to encode.
View Source
var MaxElements uint32 = 1 << 20
Functions ¶
func DecodeOption ¶
func DecodeOption[V any, H DecodablePtr[V]](d *Decoder) (*V, int, error)
func DecodeStringWithLimit ¶
func DecodeStruct ¶
func DecodeStruct[V any, H DecodablePtr[V]](d *Decoder) (V, int, error)
func DecodeStructArray ¶
func DecodeStructArray[V any, H DecodablePtr[V]](d *Decoder, value []V) (int, error)
func DecodeStructSlice ¶
func DecodeStructSlice[V any, H DecodablePtr[V]](d *Decoder) ([]V, int, error)
func EncodeOption ¶
func EncodeOption[V any, H EncodablePtr[V]](e *Encoder, value *V) (int, error)
func EncodeStringWithLimit ¶
func EncodeStruct ¶
func EncodeStruct[V any, H EncodablePtr[V]](e *Encoder, value V) (int, error)
func EncodeStructArray ¶
func EncodeStructArray[V any, H EncodablePtr[V]](e *Encoder, value []V) (int, error)
func EncodeStructSlice ¶
func EncodeStructSlice[V any, H EncodablePtr[V]](e *Encoder, value []V) (int, error)
Types ¶
type DecodablePtr ¶
type EncodablePtr ¶
type Encoder ¶
type Encoder struct {
// contains filtered or unexported fields
}
func NewEncoder ¶
NewEncoder returns a new encoder that writes to w. If w implements io.StringWriter, the returned encoder will be more efficient in encoding strings.
Click to show internal directories.
Click to hide internal directories.